Skip to content
Snippets Groups Projects
Commit f4583e11 authored by AlQuemist's avatar AlQuemist
Browse files

CMake: distinguish between BornAgain and Windows extra libraries

parent 6830e8f3
No related branches found
No related tags found
1 merge request!2760Add a new installation method for local installation under Linux
...@@ -146,7 +146,7 @@ if(WIN32) ...@@ -146,7 +146,7 @@ if(WIN32)
set(QtComp Qt6::${comp}) set(QtComp Qt6::${comp})
get_target_property(dll ${QtComp} LOCATION_Release) get_target_property(dll ${QtComp} LOCATION_Release)
get_property(dll TARGET ${QtComp} PROPERTY LOCATION_Release) get_property(dll TARGET ${QtComp} PROPERTY LOCATION_Release)
install(FILES ${dll} DESTINATION ${destination_lib} COMPONENT Libraries) install(FILES ${dll} DESTINATION ${destination_lib} COMPONENT WinLibraries)
message(STATUS "Install Qt lib ${QtComp} (${dll})") message(STATUS "Install Qt lib ${QtComp} (${dll})")
endforeach() endforeach()
...@@ -156,20 +156,20 @@ if(WIN32) ...@@ -156,20 +156,20 @@ if(WIN32)
install(FILES ${Qt_DIR}/bin/opengl32sw.dll install(FILES ${Qt_DIR}/bin/opengl32sw.dll
DESTINATION ${destination_lib} DESTINATION ${destination_lib}
COMPONENT Libraries) COMPONENT WinLibraries)
install(FILES ${Qt_PLUGINS_DIR}/platforms/qwindows.dll install(FILES ${Qt_PLUGINS_DIR}/platforms/qwindows.dll
DESTINATION bin/platforms DESTINATION bin/platforms
COMPONENT Libraries) COMPONENT WinLibraries)
install(FILES ${Qt_PLUGINS_DIR}/iconengines/qsvgicon.dll install(FILES ${Qt_PLUGINS_DIR}/iconengines/qsvgicon.dll
DESTINATION bin/iconengines DESTINATION bin/iconengines
COMPONENT Libraries) COMPONENT WinLibraries)
install(FILES ${Qt_PLUGINS_DIR}/imageformats/qjpeg.dll ${Qt_PLUGINS_DIR}/imageformats/qsvg.dll install(FILES ${Qt_PLUGINS_DIR}/imageformats/qjpeg.dll ${Qt_PLUGINS_DIR}/imageformats/qsvg.dll
DESTINATION bin/imageformats DESTINATION bin/imageformats
COMPONENT Libraries) COMPONENT WinLibraries)
set(QT_VISTA_STYLE ${Qt_PLUGINS_DIR}/styles/qwindowsvistastyle.dll) set(QT_VISTA_STYLE ${Qt_PLUGINS_DIR}/styles/qwindowsvistastyle.dll)
if(EXISTS ${QT_VISTA_STYLE}) if(EXISTS ${QT_VISTA_STYLE})
install(FILES ${QT_VISTA_STYLE} DESTINATION bin/styles COMPONENT Libraries) install(FILES ${QT_VISTA_STYLE} DESTINATION bin/styles COMPONENT WinLibraries)
else() else()
message(AUTHOR_WARNING File ${QT_VISTA_STYLE} not found.) message(AUTHOR_WARNING File ${QT_VISTA_STYLE} not found.)
endif() endif()
......
...@@ -42,7 +42,7 @@ foreach(Boost_lib ${Boost_LIBRARIES}) ...@@ -42,7 +42,7 @@ foreach(Boost_lib ${Boost_LIBRARIES})
get_filename_component(UTF_PATH ${Boost_lib} PATH) get_filename_component(UTF_PATH ${Boost_lib} PATH)
list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll") list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll")
install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll
DESTINATION ${destination_lib} COMPONENT Libraries DESTINATION ${destination_lib} COMPONENT WinLibraries
CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo]) CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo])
message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}") message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}")
endforeach() endforeach()
...@@ -54,7 +54,7 @@ foreach(lib ${Boost_Additional_Libraries}) ...@@ -54,7 +54,7 @@ foreach(lib ${Boost_Additional_Libraries})
get_filename_component(UTF_PATH ${lib} PATH) get_filename_component(UTF_PATH ${lib} PATH)
list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll") list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll")
install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll
DESTINATION ${destination_lib} COMPONENT Libraries DESTINATION ${destination_lib} COMPONENT WinLibraries
CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo]) CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo])
message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}") message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}")
endforeach() endforeach()
...@@ -66,14 +66,14 @@ foreach(lib ${GSL_LIBRARIES}) ...@@ -66,14 +66,14 @@ foreach(lib ${GSL_LIBRARIES})
get_filename_component(UTF_PATH ${lib} PATH) get_filename_component(UTF_PATH ${lib} PATH)
list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll") list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll")
install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll
DESTINATION ${destination_lib} COMPONENT Libraries DESTINATION ${destination_lib} COMPONENT WinLibraries
CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo]) CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo])
message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}") message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}")
endforeach() endforeach()
## CERF library ## CERF library
message(STATUS "Installation of Cerf library:") message(STATUS "Installation of Cerf library:")
install(FILES ${Cerf_LIBRARIES} DESTINATION ${destination_lib} COMPONENT Libraries) install(FILES ${Cerf_LIBRARIES} DESTINATION ${destination_lib} COMPONENT WinLibraries)
message(STATUS "Cerf dll: ${Cerf_LIBRARIES} - will be installed in ${destination_lib}") message(STATUS "Cerf dll: ${Cerf_LIBRARIES} - will be installed in ${destination_lib}")
list(APPEND BA_Dependencies_WIN32 "${Cerf_LIBRARIES}") list(APPEND BA_Dependencies_WIN32 "${Cerf_LIBRARIES}")
...@@ -84,7 +84,7 @@ foreach(lib ${FFTW3_LIBRARIES}) ...@@ -84,7 +84,7 @@ foreach(lib ${FFTW3_LIBRARIES})
get_filename_component(UTF_PATH ${lib} PATH) get_filename_component(UTF_PATH ${lib} PATH)
list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll") list(APPEND BA_Dependencies_WIN32 "${UTF_PATH}/${UTF_BASE_NAME}.dll")
install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll install(FILES ${UTF_PATH}/${UTF_BASE_NAME}.dll
DESTINATION ${destination_lib} COMPONENT Libraries DESTINATION ${destination_lib} COMPONENT WinLibraries
CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo]) CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo])
message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}") message(" ${UTF_PATH}/${UTF_BASE_NAME}.dll - will be installed in ${destination_lib}")
endforeach() endforeach()
...@@ -121,7 +121,7 @@ if(BA_TIFF_SUPPORT) ...@@ -121,7 +121,7 @@ if(BA_TIFF_SUPPORT)
"Dynamic link library ${DLL} (derived from ${LIB}) does not exist") "Dynamic link library ${DLL} (derived from ${LIB}) does not exist")
endif() endif()
list(APPEND BA_Dependencies_WIN32 "${DLL}") list(APPEND BA_Dependencies_WIN32 "${DLL}")
install(FILES ${DLL} COMPONENT Libraries install(FILES ${DLL} COMPONENT WinLibraries
DESTINATION ${destination_lib} DESTINATION ${destination_lib}
CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo]) CONFIGURATIONS [Release|MinSizeRel|RelWithDebInfo])
message(" ${DLL} - will be installed in ${destination_lib}") message(" ${DLL} - will be installed in ${destination_lib}")
...@@ -137,5 +137,5 @@ if(NOT EXISTS ${formfactor_DLL}) ...@@ -137,5 +137,5 @@ if(NOT EXISTS ${formfactor_DLL})
"Dynamic link library ${formfactor_DLL} (need for formfactor) does not exist") "Dynamic link library ${formfactor_DLL} (need for formfactor) does not exist")
endif() endif()
list(APPEND BA_Dependencies_WIN32 "${formfactor_DLL}") list(APPEND BA_Dependencies_WIN32 "${formfactor_DLL}")
install(FILES ${formfactor_DLL} DESTINATION ${destination_lib} COMPONENT Libraries) install(FILES ${formfactor_DLL} DESTINATION ${destination_lib} COMPONENT WinLibraries)
message(STATUS "formfactor dll: ${formfactor_DLL} - will be installed in ${destination_lib}") message(STATUS "formfactor dll: ${formfactor_DLL} - will be installed in ${destination_lib}")
...@@ -60,7 +60,14 @@ set(CPACK_PACKAGE_FILE_NAME ${_pkgname}) ...@@ -60,7 +60,14 @@ set(CPACK_PACKAGE_FILE_NAME ${_pkgname})
# NOTE: The 'Unspecified' component is a _default_ component of CPack needed to finalize # NOTE: The 'Unspecified' component is a _default_ component of CPack needed to finalize
# the installer. It must be at the end of all other components. # the installer. It must be at the end of all other components.
set(CPACK_COMPONENTS_ALL Libraries Headers Examples Applications Runtime Unspecified) set(_ALL_COMPONENTS Libraries Headers Examples Applications Runtime Unspecified)
if(WIN32)
set(CPACK_COMPONENTS_ALL ${_ALL_COMPONENTS} WinLibraries)
else()
set(CPACK_COMPONENTS_ALL ${_ALL_COMPONENTS})
endif()
include(CPack) include(CPack)
......
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