-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (34 loc) · 1.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set the project name
project(IC_project2 VERSION 1.0)
# add the librarys
add_library(bitstream src/bitstream/BitStream.cpp)
add_library(golomb src/golomb/Golomb.cpp)
add_library(codecimg src/codecimg/Codecimg.cpp)
add_library(preditorimg src/codecimg/preditor.cpp)
# add the executable
add_executable(main ${CMAKE_SOURCE_DIR}/src/main.cpp)
find_package(OpenCV REQUIRED)
# find python libraries
find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
find_package(PythonLibs 3.0 REQUIRED)
message(${PYTHON_LIBRARIES})
# populate matplotlib repository
include(FetchContent)
FetchContent_Declare(
matplotlib
GIT_REPOSITORY https://github.com/lava/matplotlib-cpp.git
GIT_TAG f23347fca25219d1c42cbb91608b5556814bf572
)
FetchContent_GetProperties(matplotlib)
if(NOT matplotlib_POPULATED)
FetchContent_Populate(matplotlib)
endif()
target_link_libraries(main PUBLIC bitstream)
target_link_libraries(golomb bitstream)
target_link_libraries(codecimg preditorimg golomb)
target_link_libraries(codecimg ${OpenCV_LIBS} ${PYTHON_LIBRARIES} Python3::NumPy)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)