cmake/cpack root dictionary issue fixed.

In order that package assembly works, the code needs to be relocatble
and any hints linking it to the original source need to be absent.
The changes here do exactely this. For rootcling the '-inlineInputHeader'
option is needed, otherwise the dictionary wants to load the header
file from the source destination which of course will fail when installing
the package on a machine without the source.
This commit is contained in:
2019-02-01 16:05:24 +01:00
parent faffd5bcd6
commit 3cb950277f
14 changed files with 98 additions and 26 deletions

View File

@ -2,17 +2,21 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(NONLOCAL_INC ${CMAKE_SOURCE_DIR}/src/external/Nonlocal)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
PNL_PippardFitterDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
PNL_PippardFitter.h
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${NONLOCAL_INC} -I${PREFIX_INC} PNL_PippardFitter.h
LINKDEF PNL_PippardFitterLinkDef.h
OPTIONS -inlineInputHeader
MODULE PNL_PippardFitter
)
root_generate_dictionary(
PNL_StartupHandlerDict PNL_StartupHandler.h LINKDEF PNL_StartupHandlerLinkDef.h
PNL_StartupHandlerDict
-I${NONLOCAL_INC} -I${PREFIX_INC} PNL_StartupHandler.h
LINKDEF PNL_StartupHandlerLinkDef.h
OPTIONS -inlineInputHeader
MODULE PNL_StartupHandler
)
@ -38,7 +42,7 @@ target_include_directories(
PNL_PippardFitter BEFORE PRIVATE
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
$<BUILD_INTERFACE:${MUSRFIT_INC}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
)
#--- set target properties, e.g. version --------------------------------------
@ -64,7 +68,8 @@ install(
#--- install PNL_PippardFitter header -----------------------------------------
install(
FILES
FILES
PNonlocal.h
PNL_PippardFitter.h
PNL_RgeHandler.h
PNL_StartupHandler.h