forked from mirror/openmw-tes3mp
Mac build - make bundle do everything except data copying
This commit is contained in:
parent
9c6663019d
commit
5187d5bb17
1 changed files with 31 additions and 8 deletions
|
@ -82,15 +82,20 @@ configure_file(${OpenMW_SOURCE_DIR}/files/plugins.cfg.linux
|
||||||
"${OpenMW_BINARY_DIR}/plugins.cfg" COPYONLY)
|
"${OpenMW_BINARY_DIR}/plugins.cfg" COPYONLY)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
find_library(CARBON_FRAMEWORK Carbon)
|
|
||||||
endif (APPLE)
|
|
||||||
|
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
||||||
"${OpenMW_BINARY_DIR}/openmw.cfg" COPYONLY)
|
"${OpenMW_BINARY_DIR}/openmw.cfg" COPYONLY)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
set(APPLE_BUNDLE_RESOURCES
|
||||||
|
${CMAKE_SOURCE_DIR}/files/openmw.cfg
|
||||||
|
# ${CMAKE_SOURCE_DIR}/files/ogre.cfg
|
||||||
|
${CMAKE_SOURCE_DIR}/files/mac/plugins.cfg
|
||||||
|
)
|
||||||
|
endif (APPLE)
|
||||||
|
|
||||||
# Main executable
|
# Main executable
|
||||||
add_executable(openmw
|
add_executable(openmw
|
||||||
|
MACOSX_BUNDLE
|
||||||
${BSA} ${BSA_HEADER}
|
${BSA} ${BSA_HEADER}
|
||||||
${TOOLS} ${TOOLS_HEADER}
|
${TOOLS} ${TOOLS_HEADER}
|
||||||
${OGRE} ${OGRE_HEADER}
|
${OGRE} ${OGRE_HEADER}
|
||||||
|
@ -101,7 +106,9 @@ add_executable(openmw
|
||||||
${GAME}
|
${GAME}
|
||||||
${ESM_STORE} ${ESM_STORE_HEADER}
|
${ESM_STORE} ${ESM_STORE_HEADER}
|
||||||
${GAMEREND} ${GAMEREND_HEADER}
|
${GAMEREND} ${GAMEREND_HEADER}
|
||||||
${ESM_HEADER})
|
${ESM_HEADER}
|
||||||
|
${APPLE_BUNDLE_RESOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(openmw
|
target_link_libraries(openmw
|
||||||
${OGRE_LIBRARIES}
|
${OGRE_LIBRARIES}
|
||||||
|
@ -109,6 +116,22 @@ target_link_libraries(openmw
|
||||||
${Boost_LIBRARIES})
|
${Boost_LIBRARIES})
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
target_link_libraries(openmw
|
find_library(CARBON_FRAMEWORK Carbon)
|
||||||
${CARBON_FRAMEWORK})
|
target_link_libraries(openmw ${CARBON_FRAMEWORK})
|
||||||
|
endif (APPLE)
|
||||||
|
|
||||||
|
# Apple bundling
|
||||||
|
if (APPLE)
|
||||||
|
set_source_files_properties(
|
||||||
|
${CMAKE_SOURCE_DIR}/files/openmw.cfg
|
||||||
|
${CMAKE_SOURCE_DIR}/files/mac/plugins.cfg
|
||||||
|
${CMAKE_SOURCE_DIR}/files/o
|
||||||
|
PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION MacOS
|
||||||
|
)
|
||||||
|
set_target_properties(
|
||||||
|
openmw
|
||||||
|
PROPERTIES
|
||||||
|
MACOSX_BUNDLE_BUNDLE_NAME "OpenMW"
|
||||||
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
Loading…
Reference in a new issue