Fix absolute path for build directory
authorEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Tue, 14 Apr 2020 18:52:07 +0000 (20:52 +0200)
committerEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Fri, 17 Apr 2020 19:28:08 +0000 (21:28 +0200)
CMakeLists.txt

index 1e53a36..0032d57 100644 (file)
@@ -26,9 +26,9 @@ endif(NOT CMAKE_BUILD_TYPE)
 message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
 
 # Build output directory:
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build/${CMAKE_BUILD_TYPE}/bin)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build/${CMAKE_BUILD_TYPE}/lib)
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build/${CMAKE_BUILD_TYPE}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib)
 message(STATUS "CMAKE_RUNTIME_OUTPUT_DIRECTORY is ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
 message(STATUS "CMAKE_LIBRARY_OUTPUT_DIRECTORY is ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 message(STATUS "CMAKE_ARCHIVE_OUTPUT_DIRECTORY is ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
@@ -145,7 +145,7 @@ FOREACH(procedure ${DYNAMIC_PROCEDURES})
   file(GLOB_RECURSE SRCS dynamic/launcher/${rel}/*.cpp)
   add_library(anna_launcher_procedure_${libpath}_shared SHARED ${SRCS})
 
-  set(target_dirname build/${CMAKE_BUILD_TYPE}/lib/dynamic/launcher/${rel})
+  set(target_dirname ${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/dynamic/launcher/${rel})
 
   set(target_basename anna_launcher_procedure_${libpath}_shared)
   set_target_properties(${target_basename} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${target_dirname})