mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Cmake: automatically create version for Mac bundle
The version info that is used for the Mac bundle is created at cmake run time, not at make run time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a41475c339
commit
aa48dfea27
1 changed files with 14 additions and 3 deletions
|
@ -34,6 +34,17 @@ include_directories(.
|
|||
qt-ui/profile
|
||||
)
|
||||
|
||||
# get the version string -- this is only used for Mac Bundle at this point
|
||||
# the other version data gets updated when running make - this is set when running cmake
|
||||
execute_process(
|
||||
COMMAND sh scripts/get-version linux
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE SSRF_VERSION_STRING
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
message(STATUS "Creating build files for Subsurface ${SSRF_VERSION_STRING}")
|
||||
|
||||
# compiler specific settings
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
|
||||
|
@ -260,9 +271,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
set(MACOSX_BUNDLE_ICON_FILE Subsurface.icns)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.subsurface-divelog")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "Subsurface")
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION "4.4.1")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "4.4.1")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "4.4.1")
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION "${SSRF_VERSION_STRING}")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${SSRF_VERSION_STRING}")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${SSRF_VERSION_STRING}")
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others")
|
||||
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE})
|
||||
|
|
Loading…
Reference in a new issue