CMake: Shifted the Mac bundle commands into its own CMake module.
This commit is contained in:
parent
08386db6ff
commit
e88017eba3
2 changed files with 21 additions and 19 deletions
19
CMakeModules/SetupFGFSBundle.cmake
Normal file
19
CMakeModules/SetupFGFSBundle.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
function(setup_fgfs_bundle target)
|
||||
execute_process(COMMAND date +%Y
|
||||
OUTPUT_VARIABLE CURRENT_YEAR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# in our local CMakeModules dir
|
||||
set_target_properties(${target} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST FlightGearBundleInfo.plist.in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "org.flightgear.FlightGear"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${FLIGHTGEAR_VERSION}
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "FlightGear ${FLIGHTGEAR_VERSION} Nightly"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${FLIGHTGEAR_VERSION}
|
||||
MACOSX_BUNDLE_COPYRIGHT "FlightGear ${FLIGHTGEAR_VERSION} © 1997-${CURRENT_YEAR}, The FlightGear Project. Licensed under the GNU Public License version 2."
|
||||
MACOSX_BUNDLE_INFO_STRING "Nightly build of FlightGear ${FLIGHTGEAR_VERSION} for testing and development"
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "FlightGear"
|
||||
MACOSX_BUNDLE_ICON_FILE "FlightGear.icns"
|
||||
)
|
||||
endfunction()
|
|
@ -1,4 +1,5 @@
|
|||
# CMake module includes.
|
||||
include(SetupFGFSBundle)
|
||||
include(SetupFGFSEmbeddedResources)
|
||||
include(SetupFGFSLibraries)
|
||||
include(SetupMSVCGrouping)
|
||||
|
@ -73,27 +74,9 @@ add_executable(fgfs
|
|||
${EMBEDDED_RESOURCE_HEADERS}
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MacOSX bundle packaging
|
||||
|
||||
if(APPLE)
|
||||
execute_process(COMMAND date +%Y
|
||||
OUTPUT_VARIABLE CURRENT_YEAR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# in our local CMakeModules dir
|
||||
set_target_properties(fgfs PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST FlightGearBundleInfo.plist.in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "org.flightgear.FlightGear"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${FLIGHTGEAR_VERSION}
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "FlightGear ${FLIGHTGEAR_VERSION} Nightly"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${FLIGHTGEAR_VERSION}
|
||||
MACOSX_BUNDLE_COPYRIGHT "FlightGear ${FLIGHTGEAR_VERSION} © 1997-${CURRENT_YEAR}, The FlightGear Project. Licensed under the GNU Public License version 2."
|
||||
MACOSX_BUNDLE_INFO_STRING "Nightly build of FlightGear ${FLIGHTGEAR_VERSION} for testing and development"
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "FlightGear"
|
||||
MACOSX_BUNDLE_ICON_FILE "FlightGear.icns"
|
||||
)
|
||||
setup_fgfs_bundle(fgfs)
|
||||
endif()
|
||||
|
||||
# Set up the target links and includes.
|
||||
|
|
Loading…
Add table
Reference in a new issue