diff --git a/CMakeLists.txt b/CMakeLists.txt index b0c1620..c63b9d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 + $ + $ + $ + $ + $ +) + 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 - $ - $ - $ - $ - $ -) - 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}) diff --git a/README.md b/README.md index cc10026..7cfbb87 100644 --- a/README.md +++ b/README.md @@ -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š. diff --git a/external/Corrade/CMakeLists.txt b/external/Corrade/CMakeLists.txt index eda33fd..1defdad 100644 --- a/external/Corrade/CMakeLists.txt +++ b/external/Corrade/CMakeLists.txt @@ -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)