Decided to dynamically link and ship corrade with tourmaline
This commit is contained in:
@@ -52,7 +52,7 @@ foreach(dep
|
||||
add_subdirectory(external/${dep})
|
||||
endforeach()
|
||||
|
||||
# Building SO
|
||||
# Building
|
||||
add_library(${PROJECT_NAME} SHARED
|
||||
"source/Systems/ECS/Components.cpp"
|
||||
"source/Systems/ECS/World.cpp"
|
||||
@@ -63,15 +63,25 @@ add_library(${PROJECT_NAME} SHARED
|
||||
|
||||
# Actual linking
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC
|
||||
Corrade::Main
|
||||
Corrade::Containers
|
||||
Corrade::Utility
|
||||
Corrade::PluginManager
|
||||
Corrade::Main
|
||||
Corrade::Containers
|
||||
Corrade::Utility
|
||||
Corrade::PluginManager
|
||||
)
|
||||
|
||||
# Module stuff
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/headers>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
|
||||
$<BUILD_INTERFACE:${corrade_SOURCE_DIR}/src>
|
||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
|
||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}External>
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(Corrade SOURCE_DIR corrade_SOURCE_DIR)
|
||||
FetchContent_GetProperties(Corrade BINARY_DIR corrade_BINARY_DIR)
|
||||
|
||||
@@ -85,21 +95,19 @@ install(
|
||||
PATTERN "*.hpp"
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/headers>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
|
||||
$<BUILD_INTERFACE:${corrade_SOURCE_DIR}/src>
|
||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
|
||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}External>
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
EXPORT ${PROJECT_NAME}Targets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
INCLUDES DESTINATION include
|
||||
INCLUDES DESTINATION include/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS CorradeMain CorradeUtility CorradeContainers CorradePluginManager
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
INCLUDES DESTINATION include/${PROJECT_NAME}External
|
||||
)
|
||||
|
||||
install(DIRECTORY headers/ DESTINATION include/${PROJECT_NAME})
|
||||
|
||||
@@ -18,7 +18,9 @@ Tormaline Engine is a game engine created for C++23. [Source Code](https://git.t
|
||||
Tourmaline is by no means currently usable. The project is incredible volatile with constant changes and improvements. Please wait until a release is made.
|
||||
|
||||
However if you cannot just help yourself you can compile a tourmaline demo by running
|
||||
g++ program.cpp -std=c++23 -lTourmaline -I/usr/local/include/TourmalineExternal -o program
|
||||
```
|
||||
g++ program.cpp -std=c++23 -lTourmaline -lCorradeUtility -lCorradePluginManager -I/usr/local/include/TourmalineExternal -o program
|
||||
```
|
||||
|
||||
# 3rd Party Libraries Credits
|
||||
- [Corrade/Magnum](https://magnum.graphics/) - graphics middleware by Vladimír "Mosra" Vondruš.
|
||||
|
||||
2
external/Corrade/CMakeLists.txt
vendored
2
external/Corrade/CMakeLists.txt
vendored
@@ -1,7 +1,7 @@
|
||||
include(FetchContent)
|
||||
|
||||
# Building options
|
||||
set(CORRADE_BUILD_STATIC ON)
|
||||
set(CORRADE_BUILD_STATIC OFF)
|
||||
|
||||
# Feature options
|
||||
set(CORRADE_WITH_MAIN ON)
|
||||
|
||||
Reference in New Issue
Block a user