-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
53 lines (43 loc) · 1.72 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
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.5)
project(Sketch3DToolkit)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/module)
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(GLUT_INCLUDE_DIR ${LIB_DIR}/freeglut-2.6.0/include)
set(GLEW_INCLUDE_DIR ${LIB_DIR}/glew-1.13.0/include)
set(GLUI_INCLUDE_DIR ${LIB_DIR}/glui-2.3/src/include)
set(TRIMESH2_INCLUDE_DIR ${LIB_DIR}/trimesh2-2.12/include)
set(LIB_INCLUDE_DIR ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ${GLUI_INCLUDE_DIR} ${TRIMESH2_INCLUDE_DIR})
include_directories(${LIB_INCLUDE_DIR} ${SRC_DIR})
include_directories(
${MODULE_DIR}/imgproc
${MODULE_DIR}/meshutil
${MODULE_DIR}/hashing
${MODULE_DIR}/retrieval
)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
set(MSVC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msvc)
set(MSVC_USER_CONFIG ${MSVC_DIR}/project.vcxproj.user.in)
set(OpenCV_DIR ${MSVC_DIR}/opencv-2.4.12)
set(OpenCV_STATIC OFF)
endif(MSVC)
find_package(OpenCV REQUIRED)
find_package(Matlab COMPONENTS MX_LIBRARY)
if(Matlab_FOUND)
add_subdirectory(mex)
endif(Matlab_FOUND)
#find_package(OpenMP)
#if(OPENMP_FOUND)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
#endif(OPENMP_FOUND)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(module)