Generate bin files in the current CMake source dir

Use CMAKE_CURRENT_SOURCE_DIR to generate the binary in the current CMake directory instead of building it at the top level of the source tree
pull/667/head
Théo Monnom 2021-12-05 17:49:50 +01:00 committed by GitHub
parent 4efceefe13
commit c1f632a146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ cmake_minimum_required(VERSION 3.6)
option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON) option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON)
# Change the output directory to the bin directory # Change the output directory to the bin directory
set(BUILD_PATH ${CMAKE_SOURCE_DIR}/bin) set(BUILD_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BUILD_PATH}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BUILD_PATH}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BUILD_PATH}") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BUILD_PATH}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BUILD_PATH}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BUILD_PATH}")