-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
36 lines (22 loc) · 1004 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(griffig VERSION 0.0.11 LANGUAGES CXX)
include(FetchContent)
option(USE_INTERNAL_PYBIND11 "Build python module" OFF)
find_package(Eigen3 REQUIRED)
find_package(GLEW REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core imgproc)
find_package(OpenGL REQUIRED COMPONENTS EGL)
find_package(Python3 REQUIRED COMPONENTS NumPy)
if(USE_INTERNAL_PYBIND11)
FetchContent_Declare(pybind11_fetch GIT_REPOSITORY https://github.com/pybind/pybind11.git GIT_TAG v2.6.2)
FetchContent_MakeAvailable(pybind11_fetch)
else()
find_package(pybind11 REQUIRED)
endif()
add_subdirectory(affx)
add_library(griffig src/griffig.cpp)
target_compile_features(griffig PUBLIC cxx_std_17)
target_include_directories(griffig PUBLIC include)
target_link_libraries(griffig PUBLIC affx opencv_core opencv_imgproc OpenGL::EGL OpenGL::GLU GLEW::GLEW pybind11::embed Python3::NumPy)
pybind11_add_module(_griffig src/python.cpp)
target_link_libraries(_griffig PUBLIC griffig)