Skip to content

Commit

Permalink
Change full path to relative path on ROOT_GENERATE_DICTIONARY
Browse files Browse the repository at this point in the history
  • Loading branch information
imorlxs committed Aug 19, 2024
1 parent 55e2592 commit 5de61fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/BioDynaMo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,15 @@ function(build_shared_library TARGET)
set(DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_dict")
set(BDM_DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_bdm_dict.cc")
set(module "${TARGET}_dict")
string(REPLACE "${CMAKE_SOURCE_DIR}/src/" "" ROOT_HEADERS "${ARG_HEADERS}")

# Since the location of the CMake files differ in the build and installation
# directory, we check if BDM_CMAKE_DIR is already set (in build directory
# case). Otherwise, set it to the installation directory
if(NOT DEFINED BDM_CMAKE_DIR)
set(BDM_CMAKE_DIR $ENV{BDMSYS}/share/cmake)
endif()
ROOT_GENERATE_DICTIONARY(${DICT_FILE} ${ARG_HEADERS} MODULE ${module} LINKDEF ${BDM_CMAKE_DIR}/${ARG_SELECTION} REFLEX OPTIONS --noIncludePaths --inlineInputHeader)
ROOT_GENERATE_DICTIONARY(${DICT_FILE} ${ROOT_HEADERS} MODULE ${module} LINKDEF ${BDM_CMAKE_DIR}/${ARG_SELECTION} REFLEX OPTIONS -I src --noIncludePaths --inlineInputHeader)
if (BDM_OUT_OF_SOURCE)
set(BDM_DICT_BIN_PATH "$ENV{BDMSYS}/bin")
else()
Expand Down

0 comments on commit 5de61fe

Please sign in to comment.