Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
science
clhep
clhep-respect-build_static_libs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File clhep-respect-build_static_libs.patch of Package clhep
Index: CLHEP-CLHEP_2_4_6_0/cmake/Modules/ClhepBuildLibrary.cmake =================================================================== --- CLHEP-CLHEP_2_4_6_0.orig/cmake/Modules/ClhepBuildLibrary.cmake +++ CLHEP-CLHEP_2_4_6_0/cmake/Modules/ClhepBuildLibrary.cmake @@ -52,13 +52,24 @@ macro(clhep_build_library package) target_link_libraries(${package}S ${package_library_list_static} ) # Install the libraries - INSTALL (TARGETS ${package} ${package}S + INSTALL (TARGETS ${package} EXPORT CLHEPLibraryDepends RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} INCLUDES DESTINATION include ) + + if (BUILD_STATIC_LIBS) + # Install the libraries + INSTALL (TARGETS ${package}S + EXPORT CLHEPLibraryDepends + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + INCLUDES DESTINATION include + ) + endif() endmacro(clhep_build_library) macro(clhep_build_libclhep ) @@ -88,7 +99,7 @@ macro(clhep_build_libclhep ) SET_TARGET_PROPERTIES(CLHEPS PROPERTIES DEFINE_SYMBOL "") # export creates library dependency files for CLHEPConfig.cmake - INSTALL(TARGETS CLHEP CLHEPS + INSTALL(TARGETS CLHEP EXPORT CLHEPLibraryDepends RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} @@ -96,6 +107,16 @@ macro(clhep_build_libclhep ) INCLUDES DESTINATION include ) + if (BUILD_STATIC_LIBS) + INSTALL(TARGETS CLHEPS + EXPORT CLHEPLibraryDepends + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + INCLUDES DESTINATION include + ) + endif() + if( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" ) # copy file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink @@ -104,13 +125,15 @@ macro(clhep_build_libclhep ) "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E copy ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} WORKING_DIRECTORY \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin\" )" ) else() # create the symbolic links - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink - "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}\" )" ) + if (BUILD_STATIC_LIBS) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink + "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}\" )" ) + INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink ) + endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}\" )" ) endif() - INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink ) INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink ) endmacro(clhep_build_libclhep ) Index: CLHEP-CLHEP_2_4_6_0/cmake/Modules/ClhepToolchain.cmake =================================================================== --- CLHEP-CLHEP_2_4_6_0.orig/cmake/Modules/ClhepToolchain.cmake +++ CLHEP-CLHEP_2_4_6_0/cmake/Modules/ClhepToolchain.cmake @@ -56,15 +56,22 @@ configure_package_config_file(${PROJECT_ # This file is include()d by CLHEPConfig.cmake # First build up list of all modular targets, static and shared set(CLHEP_libraries_all ${CLHEP_libraries}) -foreach(_lib ${CLHEP_libraries}) - list(APPEND CLHEP_libraries_all "${_lib}S") -endforeach() -export(TARGETS CLHEP CLHEPS ${CLHEP_libraries_all} +export(TARGETS CLHEP ${CLHEP_libraries_all} NAMESPACE "CLHEP::" FILE ${PROJECT_BINARY_DIR}/CLHEPLibraryDepends.cmake ) +if (BUILD_STATIC_LIBS) + foreach(_lib ${CLHEP_libraries}) + list(APPEND CLHEP_libraries_all "${_lib}S") + endforeach() + + export(TARGETS CLHEPS ${CLHEP_libraries_all} + NAMESPACE "CLHEP::" + FILE ${PROJECT_BINARY_DIR}/CLHEPLibraryDepends.cmake + ) +endif() #----------------------------------------------------------------------- # Pkg-config setup Index: CLHEP-CLHEP_2_4_6_0/cmake/Modules/ClhepBuildTest.cmake =================================================================== --- CLHEP-CLHEP_2_4_6_0.orig/cmake/Modules/ClhepBuildTest.cmake +++ CLHEP-CLHEP_2_4_6_0/cmake/Modules/ClhepBuildTest.cmake @@ -23,17 +23,23 @@ macro( clhep_test testname ) set(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) set(builddir ${CMAKE_CURRENT_BINARY_DIR}) + if (BUILD_STATIC_LIBS) + set(suffix "S") + else() + set(suffix "") + endif() + if( CTST_NOLIB ) set(package_library_list) else() - set( package_library_list ${PACKAGE}S) + set( package_library_list ${PACKAGE}${SUFFIX}) #set( package_library_list ${PROJECT_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${PACKAGE}-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ) endif() if( ${PACKAGE}_DEPS ) foreach ( dep ${${PACKAGE}_DEPS} ) ##message( STATUS "clhep_test ${testname} will use ${dep}") - list(APPEND package_library_list ${PACKAGE}S) + list(APPEND package_library_list ${PACKAGE}${SUFFIX}) #list(APPEND package_library_list ${PROJECT_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${dep}-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ) endforeach() endif()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor