-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (29 loc) · 1.18 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
cmake_minimum_required(VERSION 3.4.1)
project(iph-eco)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5WebKitWidgets REQUIRED)
if(MSVC)
find_package(Qt5Sql REQUIRED)
endif()
find_package(VTK REQUIRED)
find_package(CGAL REQUIRED COMPONENTS Core)
find_package(GeographicLib REQUIRED)
find_package(Pugixml REQUIRED)
find_library(IPH_ECO_MODEL_LIBRARY NAMES iph-eco-model PATHS ${IPH_ECO_MODEL_DIR} NO_DEFAULT_PATH)
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
endif()
include(${VTK_USE_FILE})
include(${CGAL_USE_FILE})
file(GLOB_RECURSE SOURCES src/main.cpp src/*.cpp include/*.h resources/resources.qrc resources/iph-eco.rc)
add_executable(iph-eco MACOSX_BUNDLE ${SOURCES})
target_include_directories(iph-eco PUBLIC include)
target_link_libraries(iph-eco ${IPH_ECO_MODEL_LIBRARY} ${VTK_LIBRARIES} ${CGAL_LIBRARIES} ${GeographicLib_LIBRARIES} pugixml Qt5::Widgets Qt5::Sql Qt5::WebKitWidgets)
if(MSVC)
set_target_properties(iph-eco PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:wmainCRTStartup")
endif()