Browse Source

CMake+Meta: Add inferno dependency, which includes ruc indirectly

master
Riyyi 2 years ago
parent
commit
5919f70537
  1. 6
      .gitmodules
  2. 26
      CMakeLists.txt
  3. 1
      cmake/copy-assets.cmake
  4. 1
      vendor/inferno
  5. 1
      vendor/ruc

6
.gitmodules vendored

@ -1,3 +1,3 @@
[submodule "vendor/ruc"] [submodule "vendor/inferno"]
path = vendor/ruc path = vendor/inferno
url = https://github.com/riyyi/ruc url = https://github.com/riyyi/inferno

26
CMakeLists.txt

@ -52,21 +52,28 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# ------------------------------------------ # ------------------------------------------
# Library # Library
set(RUC_BUILD_TESTS OFF) set(INFERNO_BUILD_EXAMPLES OFF)
add_subdirectory("vendor/ruc") add_subdirectory("vendor/inferno")
# ------------------------------------------ # ------------------------------------------
# Application target # Application target
# Define source files # Define source files
file(GLOB_RECURSE PROJECT_SOURCES "src/*.cpp") file(GLOB_RECURSE PROJECT_SOURCES "src/*.cpp")
set(PROJECT_SOURCES ${PROJECT_SOURCES})
add_executable(${PROJECT} ${PROJECT_SOURCES}) add_executable(${PROJECT} ${PROJECT_SOURCES})
target_include_directories(${PROJECT} PRIVATE target_include_directories(${PROJECT} PRIVATE
"src" "src")
"vendor/ruc/src") target_link_libraries(${PROJECT} inferno)
target_link_libraries(${PROJECT} ruc)
# ------------------------------------------
# Assets target
add_custom_target(${PROJECT}-assets
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/copy-assets.cmake
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_dependencies(${PROJECT} ${PROJECT}-assets)
add_dependencies(${PROJECT}-assets inferno-assets) # Copy project assets *AFTER* engine assets!
# ------------------------------------------ # ------------------------------------------
# Execute target # Execute target
@ -87,9 +94,6 @@ if (GARBAGE_BUILD_TESTS)
add_executable(${PROJECT}-unit-test ${TEST_SOURCES}) add_executable(${PROJECT}-unit-test ${TEST_SOURCES})
target_include_directories(${PROJECT}-unit-test PRIVATE target_include_directories(${PROJECT}-unit-test PRIVATE
"src" "src"
"test" "test")
"vendor/ruc/src" target_link_libraries(${PROJECT}-unit-test inferno)
"vendor/ruc/test")
target_link_libraries(${PROJECT}-unit-test ruc)
target_link_libraries(${PROJECT}-unit-test ruc-test)
endif() endif()

1
cmake/copy-assets.cmake

@ -0,0 +1 @@
file(COPY ${CMAKE_CURRENT_LIST_DIR}/../assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

1
vendor/inferno vendored

@ -0,0 +1 @@
Subproject commit f47babe5cfcdb3137c97bd197f167a2b8280024f

1
vendor/ruc vendored

@ -1 +0,0 @@
Subproject commit d3de1fb6353c81e6796515e631a73d3ec607ce3f
Loading…
Cancel
Save