-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
32 lines (22 loc) · 971 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
29
30
31
32
cmake_minimum_required(VERSION 3.19)
project(example VERSION ${CMAKE_PROJECT_VERSION})
disable_attribute_warnings()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/output)
if (MSVC)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
set(SOURCES
main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/generated/reflection.cpp)
generate_reflection_code(
CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/config.yaml
OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/generated
DEPENDS
data/bicycle.h
data/colors.h)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/generated)
add_executable(${PROJECT_NAME} ${SOURCES})
include_directories(../library/include)
target_link_libraries(${PROJECT_NAME} PRIVATE reflection)
# configure_file(config.yaml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/config.yaml COPYONLY)