-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (46 loc) · 1.49 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
54
cmake_minimum_required(VERSION 3.3)
set(target xformFb)
# hacks (should figure out how to do properly/why it doesnt work)
set(GLFW3_DIR "/usr/local/lib/cmake/glfw/")
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")
# end hacks
find_package(OpenGL REQUIRED)
find_package(GLFW3 REQUIRED)
find_package(glbinding REQUIRED)
set(OPENNI_INCLUDE_DIR "/usr/local/include/ni")
set(OPENNI_LIBRARY "/usr/local/lib/libOpenNI.dylib")
set(GLM_INCLUDE_DIR "/usr/local/include/glm")
set(GLOG_LIBRARY "/usr/local/opt/glog/lib/libglog.dylib")
include_directories(
${OPENGL_INCLUDE_DIR}
${GLFW3_INCLUDE_DIR}
${GLBINDING_INCLUDE_DIR}
${GLM_INCLUDE_DIR}
${OPENNI_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
set(libs
${OPENGL_LIBRARIES}
${GLFW3_LIBRARY}
${GLBINDING_LIBRARY}
${GLOG_LIBRARY}
${OPENNI_LIBRARY}
)
set(sources
simple_file.cpp
shader.cpp
main.cpp
kinect.cpp
)
add_executable(${target} ${sources})
target_link_libraries(${target} ${libs})
target_compile_options(${target} PRIVATE ${DEFAULT_COMPILE_FLAGS})
set_target_properties(${target}
PROPERTIES
LINKER_LANGUAGE CXX
FOLDER "${IDE_FOLDER}"
COMPILE_DEFINITIONS_DEBUG "${DEFAULT_COMPILE_DEFS_DEBUG}"
COMPILE_DEFINITIONS_RELEASE "${DEFAULT_COMPILE_DEFS_RELEASE}"
LINK_FLAGS_DEBUG "${DEFAULT_LINKER_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")