Skip to content

Commit 5de61fe

Browse files
committed
Change full path to relative path on ROOT_GENERATE_DICTIONARY
1 parent 55e2592 commit 5de61fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/BioDynaMo.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ function(build_shared_library TARGET)
112112
set(DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_dict")
113113
set(BDM_DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_bdm_dict.cc")
114114
set(module "${TARGET}_dict")
115+
string(REPLACE "${CMAKE_SOURCE_DIR}/src/" "" ROOT_HEADERS "${ARG_HEADERS}")
115116

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

0 commit comments

Comments
 (0)