-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
49 lines (37 loc) · 1.04 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
cmake_minimum_required(VERSION 3.11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(kode)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
include(CTest)
find_package(Qt5Core REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Test REQUIRED)
include_directories(SYSTEM
${CMAKE_CURRENT_SOURCE_DIR}/libkode
${CMAKE_CURRENT_SOURCE_DIR}/libkode/code_generation
)
add_subdirectory(libkode)
add_subdirectory(kxml_compiler)
#add_subdirectory(kxforms)
########### next target ###############
set(KODEBIN_SOURCES kodemain.cpp)
add_executable(kode_bin ${KODEBIN_SOURCES})
# Use the Widgets module from Qt 5.
target_link_libraries(kode_bin
Qt5::Core
Qt5::Network
Qt5::Xml
kode
)
set_target_properties(kode_bin PROPERTIES OUTPUT_NAME kode)
install(
TARGETS kode_bin
RUNTIME DESTINATION bin
)