Skip to content

Commit

Permalink
Merge pull request #5292 from cms-sw/dd4hep-3cbe0dcb
Browse files Browse the repository at this point in the history
[DD4HEP] Update to tip of dd4hep master branch
  • Loading branch information
cmsbuild committed Oct 22, 2019
2 parents 3626b6a + 7e1a6b7 commit 773609d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 21 deletions.
50 changes: 32 additions & 18 deletions dd4hep-build-static.patch
@@ -1,21 +1,35 @@
diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index d7a97e4..55ed30f 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -18,7 +18,7 @@ ENDIF()

#---Add Library---------------------------------------------------------------------
file(GLOB DDG4_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
-add_library(DDG4 SHARED ${DDG4_SOURCES})
+add_library(DDG4 STATIC ${DDG4_SOURCES})
add_library(DD4hep::DDG4 ALIAS DDG4)

target_link_libraries(DDG4
diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake
index 1605e96..ac8e06d 100644
index 174a22a..e2b8c3a 100644
--- a/cmake/DD4hepBuild.cmake
+++ b/cmake/DD4hepBuild.cmake
@@ -1019,7 +1019,7 @@ function( dd4hep_add_library binary building )
dd4hep_include_directories( "${pkg_incs}" )
add_definitions ( ${pkg_defs} )
#
- add_library ( ${binary} SHARED ${sources} )
+ add_library ( ${binary} STATIC ${sources} )
target_link_libraries ( ${binary} ${pkg_libs} )
if ( "${${pkg}_VERSION}" STREQUAL "" OR "${${pkg}_SOVERSION}" STREQUAL "" )
dd4hep_fatal ( "BAD Package versions: VERSION[${pkg}_VERSION] ${${pkg}_VERSION} SOVERSION[${pkg}_SOVERSION] ${${pkg}_SOVERSION} " )
@@ -1030,6 +1030,7 @@ function( dd4hep_add_library binary building )
if ( NOT ${ARG_NOINSTALL} )
install ( TARGETS ${binary}
LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
endif()
set ( building_binary "ON" )
@@ -613,7 +613,7 @@ function(dd4hep_add_plugin binary)
dd4hep_debug("|++++> USES ${ARG_USES}")
dd4hep_debug("|++++> INCLUDES ${ARG_INCLUDES}")
dd4hep_debug("|++++> DEFINITIONS ${ARG_DEFINITIONS}")
- add_library(${binary} SHARED ${SOURCES} ${ARG_GENERATED})
+ add_library(${binary} STATIC ${SOURCES} ${ARG_GENERATED})
target_link_libraries(${binary} PUBLIC ${ARG_USES})
target_include_directories(${binary} PUBLIC ${ARG_INCLUDES})
target_compile_definitions(${binary} PUBLIC ${ARG_DEFINITIONS})
@@ -623,7 +623,7 @@ function(dd4hep_add_plugin binary)
if(CMAKE_INSTALL_LIBDIR)
set(install_destination ${CMAKE_INSTALL_LIBDIR})
endif()
- install(TARGETS ${binary} LIBRARY DESTINATION ${install_destination})
+ install(TARGETS ${binary} ARCHIVE DESTINATION ${install_destination})
endif()
endfunction(dd4hep_add_plugin)

7 changes: 4 additions & 3 deletions dd4hep.spec
@@ -1,8 +1,9 @@
### RPM external dd4hep v01-10x

%define tag 7680c56ad011a34daacf874033a460947d548740
%define branch cms/master/9f9459d
%define github_user cms-externals

%define tag 3cbe0dcbe20776bc9a0c31f97f28a2bb90174a45
%define branch master
%define github_user AIDASoft
%define keep_archives true

Source: git+https://github.com/%{github_user}/DD4hep.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
Expand Down
2 changes: 2 additions & 0 deletions vecgeom.spec
Expand Up @@ -42,6 +42,8 @@ make %{makeprocesses}
%install
cd ../build
make %{makeprocesses} install
perl -p -i -e 's|set\(VECGEOM_EXTERNAL_INCLUDES .*|set(VECGEOM_EXTERNAL_INCLUDES "")|' \
$(grep -R 'set(VECGEOM_EXTERNAL_INCLUDES ' %{i}/lib/cmake | sed 's|:.*||' | sort | uniq)

%post
%{relocateConfig}lib/cmake/USolids/*.cmake
Expand Down

0 comments on commit 773609d

Please sign in to comment.