WSL/SLF GitLab Repository

Commit 24d19a47 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Now trying to pack MeteoIO with Inishell...

parent d2352b13
#SPDX-License-Identifier: GPL-3.0-or-later
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake/")
PROJECT(inishell)
SET(VERSION_MAJOR 2 CACHE INTERNAL "")
......@@ -43,12 +44,17 @@ INCLUDE("${PROJECT_SOURCE_DIR}/src/CMakeLists.txt")
SET(TARGET ${CMAKE_PROJECT_NAME})
SET(TARGET_TYPE "")
SET(INSTALL_OSX "")
SET(DLL_EXT "so")
IF(WIN32)
SET(TARGET_TYPE "WIN32")
SET(DLL_EXT "dll")
ENDIF(WIN32)
IF(APPLE)
SET(TARGET_TYPE "MACOSX_BUNDLE")
SET(INSTALL_OSX "BUNDLE DESTINATION bin ")
SET(DLL_EXT "dylib")
ENDIF(APPLE)
ADD_EXECUTABLE(${TARGET} ${TARGET_TYPE} ${EXTRA_LIBS_SRC} ${SOURCES} ${RESOURCES})
......@@ -59,12 +65,12 @@ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
CLEAN_DIRECT_OUTPUT 1
OUTPUT_NAME ${TARGET})
INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin BUNDLE DESTINATION bin COMPONENT exe)
INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin ${INSTALL_OSX} COMPONENT exe)
# Retrieve the absolute path to qmake and then use that path to find
# the binaries
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
GET_TARGET_PROPERTY(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
GET_FILENAME_COMPONENT(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
IF(WIN32)
FIND_PROGRAM(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
......@@ -73,19 +79,14 @@ IF(WIN32)
env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}"
"$<TARGET_FILE:${TARGET}>"
COMMENT "Running windeployqt...")
ENDIF()
ENDIF(WIN32)
IF(APPLE)
FIND_PROGRAM(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
# COMMAND "${MACDEPLOYQT_EXECUTABLE}"
# "$<TARGET_FILE_DIR:${TARGET}>"
# -always-overwrite
# COMMENT "Running macdeployqt...")
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
"bin/inishell.app"
-always-overwrite
COMMENT "Running macdeployqt...")
ENDIF()
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "bin/inishell.app" -always-overwrite
COMMENT "Running macdeployqt..."
)
ENDIF(APPLE)
###########################################################
# Custom targets
......@@ -130,6 +131,18 @@ ENDIF(WIN32)
###########################################################
## CPACK section
###########################################################
#bundle MeteoIO
FIND_PACKAGE(MeteoIO REQUIRED)
SET(ALL_RX_PERM OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
FILE(GLOB meteoio_libs "${METEOIO_ROOT}/lib/libmeteo*.${DLL_EXT}")
IF(WIN32)
INSTALL(FILES ${meteoio_libs} DESTINATION bin COMPONENT meteoio)
ELSE(WIN32)
INSTALL(FILES ${meteoio_libs} DESTINATION lib COMPONENT meteoio)
ENDIF(WIN32)
FILE(GLOB meteoio_bins "${METEOIO_ROOT}/bin/meteoio_timeserie*")
INSTALL(FILES ${meteoio_bins} DESTINATION bin PERMISSIONS ${ALL_RX_PERM} COMPONENT meteoio)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Inishell Graphical User Interface dynamic generator for numerical models")
SET(CPACK_PACKAGE_DESCRIPTION "An XML description of the input fields necessary to configure a given numerical model is used to generate on the fly a Graphical User Interface that lets the user configure the numerical model and even run it if so configured")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/Welcome.txt")
......@@ -156,6 +169,8 @@ SET(CPACK_COMPONENT_RESOURCES_DISPLAY_NAME "Inishell resources")
SET(CPACK_COMPONENT_RESOURCES_DESCRIPTION "Additional files to use Inishell")
SET(CPACK_COMPONENT_EXE_DISPLAY_NAME "Inishell application")
SET(CPACK_COMPONENT_EXE_DESCRIPTION "The Inishell applications itself with what it needs to run")
SET(CPACK_COMPONENT_METEOIO_DISPLAY_NAME "MeteoIO converter application")
SET(CPACK_COMPONENT_METEOIO_DESCRIPTION "A MeteoIO based application to read/convert/output timeseries")
IF(UNIX)
IF(APPLE) #OsX packages: IMG
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment