From 2b5cf817b46a4d204b0c5f2302ccba71f9230586 Mon Sep 17 00:00:00 2001 From: Benjamin Morgan Date: Wed, 21 Oct 2020 10:02:13 +0200 Subject: [PATCH] all: Ensure editable mode works for all packages --- engine/CMakeLists.txt | 1 + models/CMakeLists.txt | 9 ++++++--- oak/CMakeLists.txt | 3 +++ runtime/CMakeLists.txt | 5 +++-- runtime/Makefile | 2 -- runtime/layout.ini | 16 ---------------- 6 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 runtime/layout.ini diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index c85ca3ce2..7b67ef63d 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -76,6 +76,7 @@ add_executable(${target} set_target_properties(${target} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin OUTPUT_NAME ${output} ) target_compile_definitions(${target} diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt index 6fe9efc10..e06cae7e4 100644 --- a/models/CMakeLists.txt +++ b/models/CMakeLists.txt @@ -23,9 +23,12 @@ add_library(${target} ) add_library(${alias} ALIAS ${target}) set_target_properties(${target} PROPERTIES - CXX_STANDARD 14 - CXX_STANDARD_REQUIRED ON - VERSION ${CLOE_PROJECT_VERSION} + CXX_STANDARD 14 + CXX_STANDARD_REQUIRED ON + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + VERSION ${CLOE_PROJECT_VERSION} ) set_target_linting(${target}) target_include_directories(${target} diff --git a/oak/CMakeLists.txt b/oak/CMakeLists.txt index 57b9292c4..51c6119a5 100644 --- a/oak/CMakeLists.txt +++ b/oak/CMakeLists.txt @@ -24,6 +24,9 @@ set_target_linting(${target}) set_target_properties(${target} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib ) target_include_directories(${target} PUBLIC diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 5be8a318d..b64c82eea 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -38,13 +38,14 @@ add_library(${alias} ALIAS ${target}) set_target_properties(${target} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib VERSION ${CLOE_PROJECT_VERSION} ) set_target_linting(${target}) target_include_directories(${target} PUBLIC - $ - $ include ) target_link_libraries(${target} diff --git a/runtime/Makefile b/runtime/Makefile index 901817b38..180e6002d 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -1,7 +1,5 @@ PROJECT_ROOT := .. -override BUILD_LAYOUT := layout.ini - include ${PROJECT_ROOT}/Makefile.package # If BUILD_TESTS is disabled, we need to use the dependencies that diff --git a/runtime/layout.ini b/runtime/layout.ini deleted file mode 100644 index 7e6e681db..000000000 --- a/runtime/layout.ini +++ /dev/null @@ -1,16 +0,0 @@ -[source_folder] -. - -[build_folder] -build - -[includedirs] -include -build/src - -[libdirs] -build - -[bindirs] -build -