diff --git a/CMakeLists.txt b/CMakeLists.txt index 63844d4d500d72c447703a299b1a8af0675e6bb7..3b476812fecd6f4adda955c040613ac628413033 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,10 +214,6 @@ option(OGS_COVERAGE "Enables code coverage measurements with gcov/lcov." OFF) option(OGS_SYNC_SUBMODULES "Sync git submodules on CMake run. Overwrites custom URLs!" ON) -# Packaging -option(OGS_DOWNLOAD_ADDITIONAL_CONTENT "Should additional content such as manuals be downloaded and packaged?" OFF) -include(scripts/cmake/packaging/Pack.cmake) - # Third-party libraries, names come from Conan package names set(OGS_LIBS VTK Boost Eigen3 Qt Shapelib libgeotiff CACHE INTERNAL "") foreach(LIB ${OGS_LIBS}) @@ -303,6 +299,9 @@ endif() # Logging level add_definitions(-DLOGOG_LEVEL=${OGS_LOG_LEVEL}) +# Packaging +option(OGS_DOWNLOAD_ADDITIONAL_CONTENT "Should additional content such as manuals be downloaded and packaged?" OFF) +include(scripts/cmake/packaging/Pack.cmake) ###################### ### Subdirectories ### diff --git a/scripts/cmake/packaging/Pack.cmake b/scripts/cmake/packaging/Pack.cmake index ff5945b1c15c9604f1db6ee214345bac422209dc..29f0761d5a39307384d7497c4a737ac57ca095bf 100644 --- a/scripts/cmake/packaging/Pack.cmake +++ b/scripts/cmake/packaging/Pack.cmake @@ -123,9 +123,16 @@ if(OGS_USE_CONAN) endif() if(OGS_USE_PYTHON) - install(FILES ${Python_LIBRARIES} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + if(WIN32) + file(GLOB PYTHON_RUNTIME_LIBS "${Python_RUNTIME_LIBRARY_DIRS}/*.dll") + message(STATUS "Install Python: ${PYTHON_RUNTIME_LIBS}") + install(FILES ${PYTHON_RUNTIME_LIBS} DESTINATION bin) + else() + install(FILES ${Python_LIBRARIES} DESTINATION bin) + endif() endif() + configure_file(Documentation/README.txt.in ${PROJECT_BINARY_DIR}/README.txt) install(FILES ${PROJECT_BINARY_DIR}/README.txt DESTINATION .)