-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
81 lines (67 loc) · 2.44 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
project(flower)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(PROJECT_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(PROJECT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(PROJECT_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test)
set(PROJECT_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set( CMAKE_CXX_FLAGS "-std=c++11" ${CMAKE_CXX_FLAGS} )
include_directories(${PROJECT_HEADERS_DIR} ${PROJECT_HEADERS_DIR}/IO ${PROJECT_HEADERS_DIR}/GUI ${PROJECT_LIB_DIR}/imgui ${PROJECT_LIB_DIR}/helpers )
set(PROJECT_FILES
${PROJECT_SRC_DIR}/IO/rply.c
${PROJECT_SRC_DIR}/IO/plydatareader.cpp
${PROJECT_SRC_DIR}/IO/plydatawriter.cpp
${PROJECT_SRC_DIR}/edgeextractor.cpp
${PROJECT_SRC_DIR}/meanflowfilter.cpp
${PROJECT_SRC_DIR}/powermeanflowfilter.cpp
${PROJECT_SRC_DIR}/flowfactory.cpp
${PROJECT_SRC_DIR}/normalsfinder.cpp
${PROJECT_SRC_DIR}/GUI/camera.cpp
${PROJECT_SRC_DIR}/GUI/statemonitor.cpp
${PROJECT_SRC_DIR}/GUI/interface.cpp
${PROJECT_SRC_DIR}/GUI/input.cpp
${PROJECT_SRC_DIR}/mesh.cpp
${PROJECT_SRC_DIR}/flowfactory.cpp
${PROJECT_SRC_DIR}/GUI/flowrunner.cpp
${PROJECT_SRC_DIR}/GUI/glines.cpp
)
set(PROJECT_LIB
${PROJECT_LIB_DIR}/imgui/imguiRenderGL3.cpp
${PROJECT_LIB_DIR}/imgui/imgui.cpp
${PROJECT_LIB_DIR}/imgui/DroidSans.cpp
${PROJECT_LIB_DIR}/helpers/CSVExtractor.cpp
)
set(TESTS
${PROJECT_TEST_DIR}/meshtests.cpp
${PROJECT_TEST_DIR}/vectortests.cpp
${PROJECT_TEST_DIR}/pointtests.cpp
)
find_package(OpenGL REQUIRED)
if(OPENGL_FOUND)
include_directories(${OpenGL_INCLUDE_DIRS})
link_directories(${OpenGL_LIBRARY_DIRS})
add_definitions(${OpenGL_DEFINITIONS})
else()
message(ERROR " OPENGL not found!")
endif()
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
include_directories(${GLFW_INCLUDE_DIRS})
FIND_PACKAGE(GLEW REQUIRED)
if(GLEW_FOUND)
include_directories( ${GLEW_INCLUDE_PATH} )
else()
MESSAGE("GLEW not found!")
endif()
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST} ${PROJECT_FILES})
target_link_libraries(${PROJECT_NAME} ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${PROJECT_LIB})
#FIND_PACKAGE(CppUnit)
#if(CppUnit_FOUND)
# add_definitions("-Wall -o")
# include_directories( ${CppUnit_INCLUDE_DIRS} )
# add_executable( testCases ${PROJECT_TEST_DIR}/testCases.cpp ${PROJECT_FILES} ${TESTS})
# target_link_libraries( testCases ${CppUnit_LIBRARIES} )
#else()
# MESSAGE("CPPUNIT not found!")
#endif()