forked from Kahncode/kcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (18 loc) · 896 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(KCL)
file(GLOB_RECURSE SOURCES "Source/*")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
file(GLOB_RECURSE SOURCE_CODE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Source/*")
foreach(SOURCE IN LISTS SOURCE_CODE)
get_filename_component(SOURCE_PATH "${SOURCE}" PATH)
string(REPLACE "/" "\\" SOURCE_PATH_MSVC "${SOURCE_PATH}")
source_group("${SOURCE_PATH_MSVC}" FILES "${SOURCE}")
endforeach()
add_executable(KCL WIN32 ${SOURCES})
target_include_directories(KCL PRIVATE Source/)
set_property(TARGET KCL PROPERTY CXX_STANDARD 17)
set_target_properties(KCL PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Binaries)
set_target_properties(KCL PROPERTIES LINKER_LANGUAGE CXX)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set_target_properties(KCL PROPERTIES LINK_FLAGS /SUBSYSTEM:CONSOLE)
endif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")