diff --git a/App/CMakeLists.txt b/App/CMakeLists.txt index 2c95958e60e7caa57add47d537b68bca4b2f492d..18d176f2d93690bee8b5623aee751a9d327de0ef 100644 --- a/App/CMakeLists.txt +++ b/App/CMakeLists.txt @@ -50,7 +50,7 @@ endif() execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Tests/ReferenceData/IsGISAXS ${CMAKE_BINARY_DIR}/Tests/ReferenceData/IsGISAXS) # dictionaries -ROOT_GENERATE_DICTIONARY(AppDict inc/DrawHelper.h inc/TreeEventStructure.h LINKDEF AppLinkDef.h) +ROOT_GENERATE_DICTIONARY(AppDict inc/DrawHelper.h inc/TreeEventStructure.h LINKDEF AppLinkDef.h) add_executable(${executable_name} ${source_files} AppDict.cxx ${include_files}) @@ -70,7 +70,7 @@ target_link_libraries(${executable_name} ) # --- Installation --- -install (TARGETS ${executable_name} DESTINATION bin COMPONENT Applications) +install (TARGETS ${executable_name} DESTINATION ${destination_bin} COMPONENT Applications) install (DIRECTORY ${CMAKE_SOURCE_DIR}/Tests/ReferenceData/IsGISAXS DESTINATION Tests/ReferenceData COMPONENT Applications) # system libraries: ROOT installation diff --git a/CMakeLists.txt b/CMakeLists.txt index ca78970e1ebcf421d6f6a1063854bf79993235e7..84c1f013b0faf542f26337797cb39db8fb93115f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ project(BornAgain) # --- The version number --- set(BornAgain_VERSION_MAJOR 0) set(BornAgain_VERSION_MINOR 9) -set(BornAgain_VERSION_PATCH 1) +set(BornAgain_VERSION_PATCH 2) # --- General project settings --- option(BORNAGAIN_PYTHON "Build with python support" ON) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 9477761ed0a07049f6b17f8937583c10b74f1af8..30f0d688da4b917d9a59c860714a30f832599f48 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -95,27 +95,17 @@ endif() # ----------------------------------------------- # installation # ----------------------------------------------- -install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/ DESTINATION Examples COMPONENT Examples FILES_MATCHING PATTERN "*.py" ) -install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/ DESTINATION Examples COMPONENT Examples FILES_MATCHING PATTERN "refdata*.txt" ) -install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/ DESTINATION Examples COMPONENT Examples FILES_MATCHING PATTERN "README") +install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/ DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "*.py" ) +install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/ DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "refdata*.txt" ) +install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/ DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "README") # the line below copies the contains ${CMAKE_SOURCE_DIR}/bin to the bin folder of the final package # install (DIRECTORY ${CMAKE_SOURCE_DIR}/bin DESTINATION . COMPONENT Libraries) -if(WIN32) - set(libdir "bin") -else() - set(libdir "lib") -endif() -install (TARGETS ${library_name} DESTINATION ${libdir} COMPONENT Libraries) +install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries) if(WIN32 AND BORNAGAIN_PYTHON) - install(FILES - ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd - DESTINATION lib COMPONENT Libraries) - - install(FILES - ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd - DESTINATION bin COMPONENT Libraries) + install(FILES ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd DESTINATION ${destination_lib} COMPONENT Libraries) + install(FILES ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd DESTINATION ${destination_bin} COMPONENT Libraries) endif() # list of headers to install @@ -126,7 +116,7 @@ file(GLOB include_files "Samples/inc/*.h" "Tools/inc/*.h" ) -install (FILES ${include_files} DESTINATION include COMPONENT Headers) +install (FILES ${include_files} DESTINATION ${destination_include} COMPONENT Headers) # system libraries if(WIN32) @@ -145,11 +135,11 @@ if(WIN32) ${CMAKE_LIBRARY_PATH}/boost_regex${boost_suffix} ${CMAKE_LIBRARY_PATH}/boost_thread${boost_suffix} ${CMAKE_LIBRARY_PATH}/libfftw3-3.dll - DESTINATION bin COMPONENT Libraries) + DESTINATION ${destination_lib} COMPONENT Libraries) else() - install (FILES ${Boost_LIBRARIES} DESTINATION bin COMPONENT Libraries) - install (FILES ${FFTW_LIBRARY} DESTINATION bin COMPONENT Libraries) - install (FILES ${GSL_LIBRARIES} DESTINATION bin COMPONENT Libraries) + install (FILES ${Boost_LIBRARIES} DESTINATION ${destination_lib} COMPONENT Libraries) + install (FILES ${FFTW_LIBRARY} DESTINATION ${destination_lib} COMPONENT Libraries) + install (FILES ${GSL_LIBRARIES} DESTINATION ${destination_lib} COMPONENT Libraries) endif() endif() diff --git a/Core/Samples/inc/BAVersion.h b/Core/Samples/inc/BAVersion.h index cdaa2106346426d822b332bf19da038f3d22ec80..a4abaacec9dce84f55bb0540adea92edeaeadfe6 100644 --- a/Core/Samples/inc/BAVersion.h +++ b/Core/Samples/inc/BAVersion.h @@ -24,7 +24,7 @@ namespace AppVersion { const std::string g_app_name = "BornAgain"; const int major_version_number = 0; const int minor_version_number = 9; - const int patch_version_number = 1; + const int patch_version_number = 2; inline int GetMajorVersionNumber() { return major_version_number; } inline int GetMinorVersionNumber() { return minor_version_number; } diff --git a/Fit/CMakeLists.txt b/Fit/CMakeLists.txt index 595a02582fe6637130fdcf89dca530563fe1a9fa..3a26aee719dfdd0bbd69ae9b9b4bcda967e4588e 100644 --- a/Fit/CMakeLists.txt +++ b/Fit/CMakeLists.txt @@ -81,21 +81,16 @@ endif() # ----------------------------------------------- # installation # ----------------------------------------------- -if(WIN32) - set(libdir "bin") -else() - set(libdir "lib") -endif() -install (TARGETS ${library_name} DESTINATION ${libdir} COMPONENT Libraries) +install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries) if(WIN32 AND BORNAGAIN_PYTHON) - install(FILES ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd DESTINATION lib COMPONENT Libraries) - install(FILES ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd DESTINATION bin COMPONENT Libraries) + install(FILES ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd DESTINATION ${destination_lib} COMPONENT Libraries) + install(FILES ${CMAKE_BINARY_DIR}/lib/${libprefix}${library_name}.pyd DESTINATION ${destination_bin} COMPONENT Libraries) endif() # list of headers to install file(GLOB include_files "Factory/inc/*.h" ) -install (FILES ${include_files} DESTINATION include COMPONENT Headers) +install (FILES ${include_files} DESTINATION ${destination_include} COMPONENT Headers) diff --git a/GUI/coregui/CMakeLists.txt b/GUI/coregui/CMakeLists.txt index 226ac35dd72dd3df45119aec3f238b9e27ad9b4f..5d9da27b3afb07e5aca8f5dd81e71f02404a4318 100644 --- a/GUI/coregui/CMakeLists.txt +++ b/GUI/coregui/CMakeLists.txt @@ -108,7 +108,7 @@ qt5_use_modules(${executable_name} Widgets Core Gui Script WebKit WebKitWidgets # --- Installation --- -install (TARGETS ${executable_name} DESTINATION bin COMPONENT Applications) +install (TARGETS ${executable_name} DESTINATION ${destination_bin} COMPONENT Applications) # system libraries: ROOT installation if(WIN32) @@ -135,7 +135,7 @@ if(WIN32) ${ROOTSYS}/bin/iconv-1.3.dll ${ROOTSYS}/bin/libWin32gdk.dll ${ROOTSYS}/bin/libAsImage.dll - DESTINATION bin COMPONENT Libraries) + DESTINATION ${destination_lib} COMPONENT Libraries) install(FILES ${ROOTSYS}/fonts/FreeSans.otf @@ -196,7 +196,7 @@ if(WIN32) ${QTDIR}/bin/Qt5Sql.dll ${QTDIR}/bin/Qt5V8.dll ${QTDIR}/bin/Qt5WebKit.dll - DESTINATION bin COMPONENT Libraries) + DESTINATION ${destination_lib} COMPONENT Libraries) install(FILES ${QTDIR}/plugins/platforms/qwindows.dll diff --git a/GUI/externals/qt-manhattan-style/CMakeLists.txt b/GUI/externals/qt-manhattan-style/CMakeLists.txt index f60e65534ffa7314719849068575a691e6ac6953..116103784584baceb9f71ace6818adbaca4a793d 100644 --- a/GUI/externals/qt-manhattan-style/CMakeLists.txt +++ b/GUI/externals/qt-manhattan-style/CMakeLists.txt @@ -92,5 +92,5 @@ target_link_libraries(${library_name} ${Qt5Widgets_LIBRARIES}) qt5_use_modules(${library_name} Widgets) # --- installation --- -install (TARGETS ${library_name} DESTINATION bin COMPONENT Libraries) +install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries) diff --git a/ThirdParty/RootMinimizers/CMakeLists.txt b/ThirdParty/RootMinimizers/CMakeLists.txt index 0bc6ca215e9cedd72d1c561ee351e5bf3c5d2a2c..486510dd0d39572059884fc1d79c7dd787b0d180 100644 --- a/ThirdParty/RootMinimizers/CMakeLists.txt +++ b/ThirdParty/RootMinimizers/CMakeLists.txt @@ -42,4 +42,4 @@ include_directories(${GSL_INCLUDE_DIRS}) target_link_libraries(${library_name} ${GSL_LIBRARIES}) # --- installation --- -#install (TARGETS ${library_name} DESTINATION lib COMPONENT Libraries) +#install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries) diff --git a/cmake/modules/BornAgainConfiguration.cmake b/cmake/modules/BornAgainConfiguration.cmake index cc50153b549928c1654a4be42e36cf8804ee26bd..95131a6d84672473a0a0eab6bad1bd921371d8a1 100644 --- a/cmake/modules/BornAgainConfiguration.cmake +++ b/cmake/modules/BornAgainConfiguration.cmake @@ -22,6 +22,17 @@ else() set(libsuffix .so) endif() +# --- installation destinations --- +set(destination_bin bin) +set(destination_lib lib) +set(destination_include include/BornAgain) +set(destination_examples share/BornAgain/Examples) +if(WIN32) + set(destination_lib bin) + set(destination_include include) + set(destination_examples Examples) +endif() + # --- configure a header file to pass CMake settings to the source code configure_file( @@ -37,11 +48,11 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/scripts/thisbornagain.sh.in" "${CMAKE_ configure_file("${CMAKE_SOURCE_DIR}/cmake/scripts/thisbornagain.csh.in" "${CMAKE_BINARY_DIR}/bin/thisbornagain.csh" @ONLY) # --- installation - -install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.sh - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.csh - PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ - DESTINATION bin) +if(NOT WIN32) + install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.sh + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.csh + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ + DESTINATION bin) +endif() diff --git a/cmake/modules/BornAgainConfiguration.cmake.autosave b/cmake/modules/BornAgainConfiguration.cmake.autosave deleted file mode 100644 index 14239f6dbe99758f0867db0c7cc4aa977c41a343..0000000000000000000000000000000000000000 --- a/cmake/modules/BornAgainConfiguration.cmake.autosave +++ /dev/null @@ -1,49 +0,0 @@ -# BornAgain project general configuration - -execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/lib) -execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin) - -set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin) - -set(bindir $BORNAGAINSYS/bin) -set(libdir $BORNAGAINSYS/lib) - -if(WIN32) - set(libprefix lib) - set(libsuffix .dll) -elseif(APPLE) - set(libprefix lib) - set(libsuffix .so) -else() - set(libprefix lib) - set(libsuffix .so) -endif() - - - - -# --- configure a header file to pass CMake settings to the source code -configure_file( - "${CMAKE_SOURCE_DIR}/Core/Samples/inc/BAVersion.h.in" - "${CMAKE_SOURCE_DIR}/Core/Samples/inc/BAVersion.h" -) - -# --- configure deployment script for release -configure_file("${CMAKE_SOURCE_DIR}/cmake/scripts/release.sh.in" "${CMAKE_BINARY_DIR}/bin/release.sh") - -# --- configure user setup script -configure_file("${CMAKE_SOURCE_DIR}/cmake/scripts/thisbornagain.sh.in" "${CMAKE_BINARY_DIR}/bin/thisbornagain.sh" @ONLY) -configure_file("${CMAKE_SOURCE_DIR}/cmake/scripts/thisbornagain.csh.in" "${CMAKE_BINARY_DIR}/bin/thisbornagain.csh" @ONLY) - -# --- installation - -install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.sh - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisbornagain.csh - PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ - DESTINATION bin) -