forked from vivekruhela/qskeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (40 loc) · 1.82 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
cmake_minimum_required(VERSION 2.8)
project(qskeleton)
set(CMAKE_CXX_FLAGS "-O2")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if (WIN32 AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
set(CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(CMAKE_MODULE_LINKER_FLAGS "/machine:x64")
set(CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
else()
add_definitions(-DNDEBUG)
endif()
set(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
if (CMAKE_C_COMPILER MATCHES CMAKE_C_COMPILER-NOTFOUND)
message(WARNING "Cannot find compiler")
endif()
message(STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID}")
set(DEPS_DIR ${ROOT_DIR}/deps/tclap/include)
add_subdirectory(src/converter)
add_subdirectory(src/ddm)
add_subdirectory(src/ddmUI)
add_subdirectory(src/elimination)
add_subdirectory(src/eliminationUI)
add_subdirectory(src/UIUtils)
set_target_properties(UIUtils PROPERTIES FOLDER Libraries)
set_target_properties(ddm_ide PROPERTIES FOLDER Libraries)
set_target_properties(elimination_ide PROPERTIES FOLDER Libraries)
if (UNIX)
add_custom_target(post_binaries ALL DEPENDS ddmUI eliminationUI
COMMAND ${CMAKE_COMMAND} -E make_directory ${ROOT_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:ddmUI> ${ROOT_DIR}/bin/ddm
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:eliminationUI> ${ROOT_DIR}/bin/fme)
else()
add_custom_target(post_binaries ALL DEPENDS ddmUI eliminationUI
COMMAND ${CMAKE_COMMAND} -E make_directory ${ROOT_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:ddmUI> ${ROOT_DIR}/bin/ddm.exe
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:eliminationUI> ${ROOT_DIR}/bin/fme.exe)
endif()
set_target_properties(post_binaries PROPERTIES FOLDER BuildInfrastructure)