2017-10-18 23:07:17 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# metadata
|
|
|
|
set(META_PROJECT_TYPE library)
|
|
|
|
|
|
|
|
# add project files
|
|
|
|
set(HEADER_FILES
|
2017-10-28 16:23:39 +02:00
|
|
|
json/reflector.h
|
|
|
|
json/reflector-boosthana.h
|
2017-11-03 17:45:16 +01:00
|
|
|
json/reflector-chronoutilities.h
|
2017-10-28 16:23:39 +02:00
|
|
|
json/serializable.h
|
|
|
|
json/errorhandling.h
|
2017-10-18 23:07:17 +02:00
|
|
|
)
|
|
|
|
set(SRC_FILES
|
|
|
|
)
|
|
|
|
set(TEST_HEADER_FILES
|
|
|
|
)
|
|
|
|
set(TEST_SRC_FILES
|
|
|
|
tests/cppunit.cpp
|
2017-10-23 00:41:10 +02:00
|
|
|
tests/jsonreflector.cpp
|
2017-10-25 19:16:37 +02:00
|
|
|
tests/jsonreflector-boosthana.cpp
|
2017-11-03 17:45:16 +01:00
|
|
|
tests/jsonreflector-chronoutilities.cpp
|
2017-10-18 23:07:17 +02:00
|
|
|
)
|
2017-10-24 01:00:40 +02:00
|
|
|
set(CMAKE_MODULE_FILES
|
|
|
|
cmake/modules/ReflectionGenerator.cmake
|
|
|
|
)
|
2017-10-18 23:07:17 +02:00
|
|
|
set(DOC_FILES
|
|
|
|
README.md
|
|
|
|
)
|
|
|
|
|
2017-11-17 21:21:34 +01:00
|
|
|
# add (only) the include dirs for c++utilities because we're not depending on the actual library
|
|
|
|
list(APPEND PUBLIC_SHARED_INCLUDE_DIRS "${CPP_UTILITIES_INCLUDE_DIRS}")
|
|
|
|
list(APPEND PUBLIC_STATIC_INCLUDE_DIRS "${CPP_UTILITIES_INCLUDE_DIRS}")
|
2017-10-28 18:24:12 +02:00
|
|
|
|
|
|
|
# find RapidJSON, also add only the include dirs because RapidJSON is a header-only library
|
|
|
|
find_package(RapidJSON)
|
|
|
|
if(RapidJSON_FOUND)
|
|
|
|
list(APPEND PUBLIC_SHARED_INCLUDE_DIRS ${RAPIDJSON_INCLUDE_DIRS})
|
|
|
|
list(APPEND PUBLIC_STATIC_INCLUDE_DIRS ${RAPIDJSON_INCLUDE_DIRS})
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unable to find RapidJSON. Since this is the only reflection application supported at this time it makes no sense to continue.")
|
|
|
|
endif()
|
2017-10-18 23:07:17 +02:00
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(LibraryTarget)
|
|
|
|
include(TestTarget)
|
|
|
|
include(Doxygen)
|
|
|
|
include(ConfigHeader)
|