-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a global CMake config to cover both Porytiles 1.x and 2.x
- Loading branch information
1 parent
18e3622
commit 65bce7d
Showing
6 changed files
with
33 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(Porytiles CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_VERBOSE_MAKEFILE on) | ||
|
||
add_subdirectory(Porytiles-1.x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
project(PorytilesCliTool CXX) | ||
project(Porytiles1xCliTool CXX) | ||
|
||
add_executable(PorytilesCliTool main.cpp) | ||
set_target_properties(PorytilesCliTool PROPERTIES OUTPUT_NAME "porytiles") | ||
target_link_libraries(PorytilesCliTool PRIVATE PorytilesLibrary) | ||
target_include_directories(PorytilesCliTool PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11) | ||
add_executable(Porytiles1xCliTool main.cpp) | ||
set_target_properties(Porytiles1xCliTool PROPERTIES OUTPUT_NAME "porytiles") | ||
target_link_libraries(Porytiles1xCliTool PRIVATE Porytiles1xLib) | ||
target_include_directories(Porytiles1xCliTool PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
project(PorytilesLibrary CXX) | ||
project(Porytiles1xLib CXX) | ||
|
||
find_package(PNG REQUIRED) | ||
|
||
FILE(GLOB CppSources src/*.cpp) | ||
add_library(PorytilesLibrary OBJECT ${CppSources}) | ||
add_library(Porytiles1xLib OBJECT ${CppSources}) | ||
set(CANONICAL_LIB_NAME "porytiles") | ||
set_target_properties(PorytilesLibrary PROPERTIES OUTPUT_NAME "${CANONICAL_LIB_NAME}") | ||
target_include_directories(PorytilesLibrary PUBLIC ${PROJECT_SOURCE_DIR}/../vendor/fmt-10.1.1/include) | ||
target_include_directories(PorytilesLibrary PUBLIC ${PROJECT_SOURCE_DIR}/../vendor/png++-0.2.9) | ||
target_include_directories(PorytilesLibrary PUBLIC ${PNG_INCLUDE_DIRS}) | ||
set_target_properties(Porytiles1xLib PROPERTIES OUTPUT_NAME "${CANONICAL_LIB_NAME}") | ||
target_include_directories(Porytiles1xLib PUBLIC ${PROJECT_SOURCE_DIR}/../vendor/fmt-10.1.1/include) | ||
target_include_directories(Porytiles1xLib PUBLIC ${PROJECT_SOURCE_DIR}/../vendor/png++-0.2.9) | ||
target_include_directories(Porytiles1xLib PUBLIC ${PNG_INCLUDE_DIRS}) | ||
# Force dependents to include files like "porytiles/compiler.h", while internally we can simply use "compiler.h" | ||
target_include_directories(PorytilesLibrary INTERFACE ${PROJECT_SOURCE_DIR}/include PRIVATE ${PROJECT_SOURCE_DIR}/include/${CANONICAL_LIB_NAME}) | ||
target_include_directories(PorytilesLibrary PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11) | ||
target_include_directories(PorytilesLibrary PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/fast-cpp-csv-parser) | ||
target_link_libraries(PorytilesLibrary PRIVATE PNG::PNG) | ||
target_include_directories(Porytiles1xLib INTERFACE ${PROJECT_SOURCE_DIR}/include PRIVATE ${PROJECT_SOURCE_DIR}/include/${CANONICAL_LIB_NAME}) | ||
target_include_directories(Porytiles1xLib PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11) | ||
target_include_directories(Porytiles1xLib PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/fast-cpp-csv-parser) | ||
target_link_libraries(Porytiles1xLib PRIVATE PNG::PNG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
project(PorytilesTestSuite CXX) | ||
project(Porytiles1xTestSuite CXX) | ||
|
||
add_executable(PorytilesTestSuite tests.cpp) | ||
target_link_libraries(PorytilesTestSuite PRIVATE PorytilesLibrary) | ||
target_include_directories(PorytilesTestSuite PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11) | ||
add_executable(Porytiles1xTestSuite tests.cpp) | ||
target_link_libraries(Porytiles1xTestSuite PRIVATE Porytiles1xLib) | ||
target_include_directories(Porytiles1xTestSuite PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11) |