OS X Bundling

This commit is contained in:
Leonardo Murillo 2015-11-20 14:45:25 -06:00
parent 6f3d818121
commit 6105191a3f
2 changed files with 6 additions and 5 deletions

View file

@ -22,8 +22,11 @@ macro(SETUP_HIFI_PROJECT)
endif ()
endforeach()
# add the executable, include additional optional sources
add_executable(${TARGET_NAME} ${TARGET_SRCS} ${AUTOMTC_SRC} ${AUTOSCRIBE_SHADER_LIB_SRC})
if (DEFINED BUILD_BUNDLE AND BUILD_BUNDLE AND APPLE)
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${TARGET_SRCS} ${AUTOMTC_SRC} ${AUTOSCRIBE_SHADER_LIB_SRC})
else ()
add_executable(${TARGET_NAME} ${TARGET_SRCS} ${AUTOMTC_SRC} ${AUTOSCRIBE_SHADER_LIB_SRC})
endif()
set(${TARGET_NAME}_DEPENDENCY_QT_MODULES ${ARGN})
list(APPEND ${TARGET_NAME}_DEPENDENCY_QT_MODULES Core)

View file

@ -1,4 +1,5 @@
set(TARGET_NAME "stack-manager")
set(BUILD_BUNDLE YES)
setup_hifi_project(Widgets Gui Svg Core Network WebKitWidgets)
if (WIN32)
@ -31,8 +32,6 @@ include_directories(
target_quazip()
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
if (APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
set(MACOSX_BUNDLE_BUNDLE_NAME "Stack Manager")
@ -40,7 +39,6 @@ if (APPLE)
set(MACOSX_BUNDLE_ICON_FILE icon.icns)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/assets/icon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(SM_SRCS ${SM_SRCS} "${CMAKE_CURRENT_SOURCE_DIR}/assets/icon.icns")
# add_executable(${TARGET_NAME} MACOSX_BUNDLE ${SM_SRCS})
else ()
if (WIN32)
# add_executable(${TARGET_NAME} WIN32 ${SM_SRCS} windows_icon.rc)