Skip to content
Snippets Groups Projects
Commit e3dbb318 authored by Markus Frank's avatar Markus Frank Committed by MarkusFrankATcernch
Browse files

Bloody MACs. Should be scrapped!

parent 0c5cdd38
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(GaudiPluginService)
find_package(Boost COMPONENTS filesystem REQUIRED)
find_package(Boost COMPONENTS filesystem system REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIR})
add_library(DD4hepGaudiPluginMgr SHARED src/PluginServiceV1.cpp src/PluginServiceV2.cpp interface/DD4hepV1.cpp interface/DD4hepV2.cpp)
......@@ -16,7 +16,7 @@ target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-deprecated)
target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-keyword-macro)
target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-return-type-c-linkage)
target_link_libraries(DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS} ${Boost_FILESYSTEM_LIBRARY} )
target_link_libraries(DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} )
SET_TARGET_PROPERTIES(DD4hepGaudiPluginMgr PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
......@@ -25,7 +25,7 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
endif()
add_executable(listcomponents src/listcomponents.cpp )
target_link_libraries(listcomponents DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS} ${Boost_FILESYSTEM_LIBRARY})
target_link_libraries(listcomponents DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} )
target_compile_options(listcomponents PRIVATE -Wno-deprecated)
install(TARGETS listcomponents DD4hepGaudiPluginMgr
......
......@@ -96,12 +96,17 @@ function(dd4hep_generate_rootmap_notapple library)
set(libname ${CMAKE_SHARED_MODULE_PREFIX}${library}${CMAKE_SHARED_LIBRARY_SUFFIX})
#message(STATUS "DD4hep_DIR = ${DD4hep_DIR}" )
find_package(Boost COMPONENTS filesystem)
GET_FILENAME_COMPONENT(boost_dir ${Boost_FILESYSTEM_LIBRARY} DIRECTORY)
message(STATUS " *** listcomponents: boost_dir: ${boost_dir} " )
add_custom_command(TARGET ${library}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -Dlibname=${libname} -Drootmapfile=${rootmapfile}
-Dgenmap_install_dir=${LIBRARY_OUTPUT_PATH}
-DROOT_VERSION=${ROOT_VERSION}
-DDD4hep_DIR=${DD4hep_DIR}
-DLD_PATH=${boost_dir}
-P ${DD4hep_DIR}/cmake/MakeGaudiMap.cmake)
#add_custom_command(OUTPUT ${rootmapfile}
......
......@@ -7,11 +7,11 @@ message(STATUS " *** Gaudi listcomponents: Generate map for ${libname} ..." )
MESSAGE( STATUS " *** MakeGaudiMap.cmake run command : ${Gaudi_listcomponents_CMD} -o ${rootmapfile} ${libname}
WORKING_DIRECTORY ${genmap_install_dir} "
)
message(STATUS " *** listcomponents: LD_PATH: ${LD_PATH} " )
if(APPLE)
SET ( ENV{DYLD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH}:$ENV{Boost_LIBRARY_DIRS} )
SET ( ENV{DYLD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH}:${LD_PATH} )
EXECUTE_PROCESS( COMMAND echo DYLD_LIBRARY_PATH = $ENV{DYLD_LIBRARY_PATH} )
EXECUTE_PROCESS( COMMAND echo Boost_LIBRARY_DIRS = $ENV{Boost_LIBRARY_DIRS} )
EXECUTE_PROCESS( COMMAND echo LD_PATH = ${LD_PATH} )
else()
SET ( ENV{LD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{LD_LIBRARY_PATH} )
#SET ( ENV{LD_PRELOAD} /lib64/libglapi.so )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment