|
1 | 1 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) |
2 | 2 |
|
3 | | -list(APPEND SOURCES |
4 | | - array.h |
5 | | - choice.cpp |
6 | | - functional.cpp |
7 | | - functions.h functions.cpp |
8 | | - globals_impl.h globals_impl.cpp |
9 | | - output.h output.cpp |
10 | | - platform.h |
11 | | - runner_impl.h runner_impl.cpp |
12 | | - simple_restorable_stack.h stack.h stack.cpp |
13 | | - story_impl.h story_impl.cpp |
14 | | - snapshot_impl.h snapshot_impl.cpp snapshot_interface.h |
15 | | - story_ptr.cpp |
16 | | - system.cpp |
17 | | - value.h value.cpp |
| 3 | +list( |
| 4 | + APPEND |
| 5 | + SOURCES |
| 6 | + array.h |
| 7 | + choice.cpp |
| 8 | + functional.cpp |
| 9 | + functions.h |
| 10 | + functions.cpp |
| 11 | + globals_impl.h |
| 12 | + globals_impl.cpp |
| 13 | + output.h |
| 14 | + output.cpp |
| 15 | + platform.h |
| 16 | + runner_impl.h |
| 17 | + runner_impl.cpp |
| 18 | + simple_restorable_stack.h |
| 19 | + stack.h |
| 20 | + stack.cpp |
| 21 | + story_impl.h |
| 22 | + story_impl.cpp |
| 23 | + snapshot_impl.h |
| 24 | + snapshot_impl.cpp |
| 25 | + snapshot_interface.h |
| 26 | + story_ptr.cpp |
| 27 | + system.cpp |
| 28 | + value.h |
| 29 | + value.cpp |
18 | 30 | tuple.hpp |
19 | | - string_table.h string_table.cpp |
20 | | - list_table.h list_table.cpp |
21 | | - list_impl.h list_impl.cpp |
22 | | - operations.h operation_bases.h |
23 | | - list_operations.h list_operations.cpp |
24 | | - container_operations.h container_operations.cpp |
25 | | - numeric_operations.h numeric_operations.cpp |
26 | | - string_operations.h string_operations.cpp |
| 31 | + string_table.h |
| 32 | + string_table.cpp |
| 33 | + list_table.h |
| 34 | + list_table.cpp |
| 35 | + list_impl.h |
| 36 | + list_impl.cpp |
| 37 | + operations.h |
| 38 | + operation_bases.h |
| 39 | + list_operations.h |
| 40 | + list_operations.cpp |
| 41 | + container_operations.h |
| 42 | + container_operations.cpp |
| 43 | + numeric_operations.h |
| 44 | + numeric_operations.cpp |
| 45 | + string_operations.h |
| 46 | + string_operations.cpp |
27 | 47 | string_operations.cpp |
28 | 48 | numeric_operations.cpp |
29 | 49 | casting.h |
30 | 50 | executioner.h |
31 | 51 | string_utils.h |
32 | 52 | header.cpp |
33 | | - random.h |
34 | | -) |
35 | | -list(APPEND COLLECTION_SOURCES |
36 | | - collections/restorable.h |
37 | | - collections/restorable.cpp |
38 | | -) |
39 | | -FILE(GLOB PUBLIC_HEADERS "include/*") |
| 53 | + random.h) |
| 54 | +list(APPEND COLLECTION_SOURCES collections/restorable.h collections/restorable.cpp) |
| 55 | +file(GLOB PUBLIC_HEADERS "include/*") |
40 | 56 |
|
41 | 57 | source_group(Collections REGULAR_EXPRESSION collections/.*) |
42 | 58 | add_library(inkcpp_o OBJECT ${SOURCES} ${COLLECTION_SOURCES}) |
43 | | -target_include_directories(inkcpp_o PUBLIC |
44 | | - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
45 | | - $<INSTALL_INTERFACE:include> |
46 | | -) |
47 | | -add_library(inkcpp $<TARGET_OBJECTS:inkcpp_o>) |
48 | | -target_include_directories(inkcpp PUBLIC |
49 | | - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
50 | | - $<INSTALL_INTERFACE:include> |
51 | | -) |
| 59 | +target_include_directories(inkcpp_o PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 60 | + $<INSTALL_INTERFACE:include>) |
| 61 | +target_compile_definitions(inkcpp_o PRIVATE INKCPP_BUILD_CLIB INKCPP_NO_EXCEPTIONS INKCPP_NO_RTTI) |
| 62 | +add_library(inkcpp ${SOURCES} ${COLLECTION_SOURCES}) |
| 63 | +target_include_directories(inkcpp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 64 | + $<INSTALL_INTERFACE:include>) |
52 | 65 | set_target_properties(inkcpp PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") |
53 | 66 |
|
54 | | -# Make sure the include directory is included |
| 67 | +# Make sure the include directory is included |
55 | 68 | target_link_libraries(inkcpp_o PUBLIC inkcpp_shared) |
56 | 69 | target_link_libraries(inkcpp PUBLIC inkcpp_shared) |
57 | 70 | # Make sure this project and all dependencies use the C++17 standard |
58 | 71 | target_compile_features(inkcpp PUBLIC cxx_std_17) |
59 | 72 |
|
60 | | - |
61 | 73 | # Unreal installation |
62 | 74 | list(REMOVE_ITEM SOURCES "avl_array.h") |
63 | | -configure_file("avl_array.h" "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/ThirdParty/Private/avl_array.h" COPYONLY) |
64 | | -foreach(FILE IN LISTS SOURCES) |
65 | | - configure_file("${FILE}" "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/inkcpp/Private/ink/${FILE}" COPYONLY) |
| 75 | +configure_file("avl_array.h" |
| 76 | + "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/ThirdParty/Private/avl_array.h" COPYONLY) |
| 77 | +foreach(file IN LISTS SOURCES) |
| 78 | + configure_file("${file}" "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/inkcpp/Private/ink/${file}" |
| 79 | + COPYONLY) |
66 | 80 | endforeach() |
67 | | -foreach(FILE IN LISTS PUBLIC_HEADERS) |
68 | | - get_filename_component(FILE "${FILE}" NAME) |
69 | | - configure_file("include/${FILE}" "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/inkcpp/Public/ink/${FILE}" COPYONLY) |
| 81 | +foreach(file IN LISTS PUBLIC_HEADERS) |
| 82 | + get_filename_component(file "${file}" NAME) |
| 83 | + configure_file("include/${file}" |
| 84 | + "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/inkcpp/Public/ink/${FILE}" COPYONLY) |
70 | 85 | endforeach() |
71 | | -foreach(FILE IN LISTS COLLECTION_SOURCES) |
72 | | - configure_file("${FILE}" "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/inkcpp/Private/ink/${FILE}" COPYONLY) |
| 86 | +foreach(file IN LISTS COLLECTION_SOURCES) |
| 87 | + configure_file("${file}" "${CMAKE_BINARY_DIR}/unreal/inkcpp/Source/inkcpp/Private/ink/${file}" |
| 88 | + COPYONLY) |
73 | 89 | endforeach() |
0 commit comments