Introduce OSG_BUILD_APPLICATION_BUNDLES option for OSX, defaulting to OFF.

This commit is contained in:
Robert Osfield 2007-06-04 21:02:15 +00:00
parent a1e436d9e7
commit 082ce2e8d4
2 changed files with 16 additions and 5 deletions

View File

@ -354,6 +354,9 @@ IF(APPLE)
ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
ENDIF(EXISTS /Developer/SDKs/10.5.sdk) ENDIF(EXISTS /Developer/SDKs/10.5.sdk)
ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" OFF)
ENDIF(APPLE) ENDIF(APPLE)

View File

@ -171,11 +171,19 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
# SET(MACOSX_BUNDLE_INFO_STRING "Info string, localized?") # SET(MACOSX_BUNDLE_INFO_STRING "Info string, localized?")
ENDIF(APPLE) ENDIF(APPLE)
IF(WIN32 AND REQUIRE_WINMAIN_FLAG) IF(WIN32)
ADD_EXECUTABLE(${TARGET_TARGETNAME} WIN32 ${TARGET_SRC} ${TARGET_H}) IF (REQUIRE_WINMAIN_FLAG)
ELSE(WIN32 AND REQUIRE_WINMAIN_FLAG) SET(PLATFORM_SPECIFIC_CONTROL WIN32)
ADD_EXECUTABLE(${TARGET_TARGETNAME} MACOSX_BUNDLE ${TARGET_SRC} ${TARGET_H}) ENDIF(REQUIRE_WINMAIN_FLAG)
ENDIF(WIN32 AND REQUIRE_WINMAIN_FLAG) ENDIF(WIN32)
IF(APPLE)
IF(OSG_BUILD_APPLICATION_BUNDLES)
SET(PLATFORM_SPECIFIC_CONTROL MACOSX_BUNDLE)
ENDIF(OSG_BUILD_APPLICATION_BUNDLES)
ENDIF(APPLE)
ADD_EXECUTABLE(${TARGET_TARGETNAME} ${PLATFORM_SPECIFIC_CONTROL} ${TARGET_SRC} ${TARGET_H})
ENDIF(${IS_COMMANDLINE_APP}) ENDIF(${IS_COMMANDLINE_APP})
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}") SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")