-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
73 lines (62 loc) · 3.19 KB
/
Copy pathCMakeLists.txt
File metadata and controls
73 lines (62 loc) · 3.19 KB
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
project( cutcell )
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if ( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW )
endif()
find_package(CGAL QUIET COMPONENTS Core )
include(${CGAL_USE_FILE})
if ( CGAL_FOUND )
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
include_directories(BEFORE include)
add_executable( "make_cube_3" "make_cube_3.cpp")
add_to_cached_list(CGAL_EXECUTABLE_TARGETS "make_cube_3")
# Link the executable to CGAL and third-party libraries
if ( CGAL_AUTO_LINK_ENABLED )
target_link_libraries("make_cube_3" ${CGAL_3RD_PARTY_LIBRARIES})
else()
target_link_libraries("make_cube_3" ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
endif()
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
add_executable( "cutcelltest" "cutcelltest.cpp" "cutcell.cpp")
add_to_cached_list(CGAL_EXECUTABLE_TARGETS "cutcelltest")
# Link the executable to CGAL and third-party libraries
if ( CGAL_AUTO_LINK_ENABLED )
target_link_libraries("cutcelltest" ${CGAL_3RD_PARTY_LIBRARIES} cgns)
else()
target_link_libraries("cutcelltest" ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} cgns)
endif()
install( TARGETS cutcelltest RUNTIME DESTINATION bin )
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
if (QT4_FOUND)
include(${QT_USE_FILE})
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
include_directories(BEFORE ${QT_INCLUDE_DIR})
QT4_WRAP_UI(cutcelluih "cutcell.ui")
QT4_WRAP_CPP(cutcellguimoc "include/cutcellgui.hpp")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable("cutcellgui" ${cutcellguimoc} ${cutcelluih} "cutcellgui.cpp" "cutcell.cpp")
add_to_cached_list(CGAL_EXECUTABLE_TARGETS "cutcellgui")
# Link the executable to CGAL and third-party libraries
target_link_libraries("cutcellgui" ${CGAL_LIBRARIES} ${QT_LIBRARIES} cgns)
install( TARGETS cutcellgui RUNTIME DESTINATION bin )
else (QT4_FOUND)
message(STATUS "NOTICE: This program requires Qt4, and will not be compiled.")
endif (QT4_FOUND)
find_package(Boost COMPONENTS program_options)
if (Boost_FOUND AND Boost_PROGRAM_OPTIONS_FOUND)
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
include_directories(${Boost_INCLUDE_DIRS})
add_executable("cutcell" "cutcellcli.cpp" "cutcell.cpp")
target_link_libraries("cutcell" ${Boost_LIBRARIES} ${Boost_program_options_LIBRARY})
# Link the executable to CGAL and third-party libraries
if ( CGAL_AUTO_LINK_ENABLED )
target_link_libraries("cutcell" ${CGAL_3RD_PARTY_LIBRARIES} cgns)
else()
target_link_libraries("cutcell" ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} cgns)
endif()
install( TARGETS cutcell RUNTIME DESTINATION bin )
else (Boost_FOUND AND Boost_PROGRAM_OPTIONS_FOUND)
message(STATUS "NOTICE: This program requires Boost, and will not be compiled.")
endif(Boost_FOUND AND Boost_PROGRAM_OPTIONS_FOUND)
endif()