-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
CMakeLists.txt
42 lines (36 loc) · 1.2 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
add_library(cucumber_gherkin_lib)
add_library(cucumber::gherkin ALIAS cucumber_gherkin_lib)
set(CUCUMBER_GHERKIN_LIB_INC_DIR "${PROJECT_SOURCE_DIR}/include/gherkin")
file(GLOB_RECURSE CUCUMBER_GHERKIN_LIB_HEADERS "${CUCUMBER_GHERKIN_LIB_INC_DIR}/*.hpp")
list(APPEND CUCUMBER_GHERKIN_LIB_ALL_SOURCES ${CUCUMBER_GHERKIN_LIB_HEADERS})
set(CUCUMBER_GHERKIN_LIB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
file(GLOB_RECURSE CUCUMBER_GHERKIN_LIB_SOURCES "${CUCUMBER_GHERKIN_LIB_SRC_DIR}/*.[ch]pp")
list(APPEND CUCUMBER_GHERKIN_LIB_ALL_SOURCES ${CUCUMBER_GHERKIN_LIB_SOURCES})
target_sources(
cucumber_gherkin_lib
PRIVATE
${CUCUMBER_GHERKIN_LIB_ALL_SOURCES}
)
target_include_directories(
cucumber_gherkin_lib
PUBLIC
$<BUILD_INTERFACE:${CUCUMBER_GHERKIN_LIB_INC_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/cucumber>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries(
cucumber_gherkin_lib
PUBLIC
nlohmann_json::nlohmann_json
cucumber::messages
)
set_target_properties(
cucumber_gherkin_lib
PROPERTIES
CXX_STANDARD 17
VERSION 0.1.0
SOVERSION 0.1
EXPORT_NAME gherkin
OUTPUT_NAME cucumber_gherkin
)