forked from yiywain/SouiChartDemo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
62 lines (49 loc) · 2.03 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
#
#
cmake_minimum_required(VERSION 3.4.3)
project(SouiChartDemo)
file (TO_CMAKE_PATH "$ENV{SOUI3PATH}" SOUI_ROOT)
message(STATUS "SOUI_ROOT: ${SOUI_ROOT}")
if ("${SOUI_ROOT}" STREQUAL "")
message(FATAL_ERROR "FATAL:can't find env variable SOUI3PATH, clone soui core and install wizard first, please.")
endif()
include(${SOUI_ROOT}/__cmake/cotire.cmake)
include(${SOUI_ROOT}/__cmake/internal_utils.cmake)
include(${SOUI_ROOT}/__cmake/global.cmake)
readSettingFile(UNICODE "1" USE_UNICODE)
readSettingFile(WCHAR "1" WCHAR_AS_DEFAULT)
readSettingFile(MT "0" SHARED_CRT)
readSettingFile(SUPPORT_XP "1" XP_TOOLSET)
#message(STATUS "USE_UNICODE: ${USE_UNICODE}")
#message(STATUS "WCHAR_AS_DEFAULT: ${WCHAR_AS_DEFAULT}")
#message(STATUS "SHARED_CRT: ${SHARED_CRT}")
#message(STATUS "XP_TOOLSET: ${XP_TOOLSET}")
config_compiler_and_linker()
#add_definitions(-D_CRT_SECURE_NO_WARNINGS)
include_directories(${SOUI_ROOT}/config)
include_directories(${SOUI_ROOT}/components)
include_directories(${SOUI_ROOT}/utilities/include)
include_directories(${SOUI_ROOT}/SOUI/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB_RECURSE CURRENT_HEADERS *.h *.hpp)
file(GLOB_RECURSE CURRENT_SRCS *.cpp)
file(GLOB_RECURSE CURRENT_SOUIS *.xml *.idx *.ico)
file(GLOB_RECURSE CURRENT_RC *.rc *.rc2)
source_group("Header Files" FILES ${CURRENT_HEADERS})
source_group("Source Files" FILES ${CURRENT_SRCS})
source_group("SoUI Resouece" FILES ${CURRENT_SOUIS})
source_group("Resource Files" FILES ${CURRENT_RC})
link_directories(${SOUI_ROOT}/bin)
add_executable(SouiChartDemo WIN32 ${CURRENT_HEADERS} ${CURRENT_SRCS} ${CURRENT_SOUIS} ${CURRENT_RC})
#add_dependencies(SouiChartDemo soui-sys-resource)
#target_link_libraries(SouiChartDemo soui utilities ${COM_LIBS})
target_link_libraries(SouiChartDemo
debug soui3d optimized soui3
debug utilitiesd optimized utilities
)
set_target_properties(SouiChartDemo PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
set_target_properties (SouiChartDemo PROPERTIES
FOLDER demos
)
cotire(SouiChartDemo)