Skip to content
Snippets Groups Projects
Commit 84621082 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Simplified packaging.

- Works on Mac
- Needs to be checked on Linux / Windows.
parent da3ea5b3
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,3 @@ cpack_add_component(ogs_cli
DESCRIPTION "The command line interface for OpenGeoSys."
GROUP Applications
)
include(packaging/InstallDependencies)
InstallDependencies(ogs)
......@@ -40,7 +40,7 @@ source_group("UI Files" FILES ${UIS})
set(APP_ICON ${SOURCE_DIR_REL}/scripts/packaging/ogs-de-icon.icns)
# Create the executable
add_executable(DataExplorer MACOSX_BUNDLE
add_executable(DataExplorer
main.cpp
${SOURCES}
${UIS}
......@@ -103,18 +103,7 @@ set_property(TARGET DataExplorer PROPERTY FOLDER "DataExplorer")
####################
### Installation ###
####################
if(APPLE)
include(packaging/PackagingMacros)
ConfigureMacOSXBundle(DataExplorer ${APP_ICON})
install(TARGETS DataExplorer DESTINATION .)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
include(InstallRequiredSystemLibraries)
include(DeployQt4)
INSTALL_QT4_EXECUTABLE(DataExplorer.app "" "" "${CONAN_LIB_DIRS}" "" "" ogs_gui)
else()
install(TARGETS DataExplorer RUNTIME DESTINATION bin COMPONENT ogs_gui)
endif()
install(TARGETS DataExplorer RUNTIME DESTINATION bin COMPONENT ogs_gui)
cpack_add_component(ogs_gui
DISPLAY_NAME "OGS Data Explorer"
......@@ -123,9 +112,3 @@ cpack_add_component(ogs_gui
)
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "DataExplorer" "OGS Data Explorer" PARENT_SCOPE)
set(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "bin/DataExplorer.exe" "Data Explorer" PARENT_SCOPE)
if(APPLE)
return()
endif()
include(packaging/InstallDependencies)
InstallDependencies(DataExplorer)
......@@ -244,4 +244,3 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/BaseLib/BuildInfo.cpp" @ONLY)
include(scripts/cmake/MarkVariablesAdvanced.cmake)
include(scripts/cmake/packaging/GetDependencies.cmake)
......@@ -28,11 +28,7 @@ endif()
# tetgen
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tetgen/CMakeLists.txt)
add_subdirectory(tetgen)
if(APPLE AND OGS_BUILD_GUI)
install (PROGRAMS $<TARGET_FILE:tetgen> DESTINATION DataExplorer.app/Contents/MacOS COMPONENT ogs_extras)
else()
install (PROGRAMS $<TARGET_FILE:tetgen> DESTINATION bin COMPONENT ogs_extras)
endif()
install (PROGRAMS $<TARGET_FILE:tetgen> DESTINATION bin COMPONENT ogs_extras)
endif()
# vtkdiff
......
macro(InstallXmlSchemaFiles GLOB_EXPRESSION)
file(GLOB XSD_FILES . ${GLOB_EXPRESSION})
if(APPLE AND OGS_BUILD_GUI)
install(FILES ${XSD_FILES} DESTINATION ${CMAKE_BINARY_DIR}/_CPack_Packages/Darwin/DragNDrop/${CPACK_PACKAGE_FILE_NAME}/ALL_IN_ONE/DataExplorer.app/Contents/MacOS COMPONENT ogs_gui)
else()
install(FILES ${XSD_FILES} DESTINATION bin COMPONENT ogs_cli)
endif()
install(FILES ${XSD_FILES} DESTINATION bin COMPONENT ogs_cli)
endmacro()
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