mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 04:13:01 +02:00
Mac build changes.
This commit is contained in:
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,5 +1,6 @@
|
||||
* text=auto !eol
|
||||
AnimView/AnimView.ico -text
|
||||
AnimView/Icon.icns -text
|
||||
CorsixTH/Bitmap/aux_ui.dat -text svneol=unset#unset
|
||||
CorsixTH/Bitmap/aux_ui.tab -text
|
||||
CorsixTH/Bitmap/bootstrap_font.bmp -text
|
||||
@@ -52,9 +53,12 @@ CorsixTH/Levels/avatar.map -text
|
||||
CorsixTH/Levels/confined_v5.map -text
|
||||
CorsixTH/Levels/finisham.map -text
|
||||
CorsixTH/Lua/languages/hungarian.lua -text
|
||||
CorsixTH/RequiredResources.txt -text
|
||||
CorsixTH/__MACOSX/SDLMain/._SDLMain.m -text
|
||||
LDocGen/output/corner_right.gif -text
|
||||
LDocGen/output/logo.png -text
|
||||
LPEG/lpeg-128.gif -text
|
||||
MapEdit/Icon.icns -text
|
||||
MapEdit/MapEdit.ico -text
|
||||
MapEdit/RequiredResources.txt -text
|
||||
WindowsInstaller/welcome.bmp -text
|
||||
|
@@ -26,7 +26,7 @@ SET(animview_source_files
|
||||
# Declaration of the executable
|
||||
IF(APPLE)
|
||||
|
||||
set(corsixth_icon_file ${CMAKE_SOURCE_DIR}/CorsixTH/Icon.icns)
|
||||
set(corsixth_icon_file ${CMAKE_SOURCE_DIR}/AnimView/Icon.icns)
|
||||
set_source_files_properties(
|
||||
${corsixth_icon_file}
|
||||
PROPERTIES
|
||||
@@ -42,6 +42,8 @@ IF(APPLE)
|
||||
)
|
||||
|
||||
set_target_properties(AnimView PROPERTIES LINK_FLAGS_MINSIZEREL "-dead_strip")
|
||||
set_target_properties(AnimView PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks")
|
||||
|
||||
ELSE()
|
||||
add_executable(
|
||||
AnimView
|
||||
|
BIN
AnimView/Icon.icns
Normal file
BIN
AnimView/Icon.icns
Normal file
Binary file not shown.
@@ -73,20 +73,12 @@ IF(APPLE)
|
||||
add_executable(CorsixTH MACOSX_BUNDLE ${corsixth_source_files} ${corsixth_icon_file})
|
||||
|
||||
set_target_properties(CorsixTH PROPERTIES LINK_FLAGS_MINSIZEREL "-dead_strip")
|
||||
set_target_properties(CorsixTH PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks")
|
||||
|
||||
#Add an extra step at the end of the build process to copy the resources into the
|
||||
#bundle. I haven't yet found a way to keep the folder structure when adding resources
|
||||
#into XCode. I would have thought we could use source_group but apparently not.
|
||||
set(corsixth_bundle_resources
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/CorsixTH.lua
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/Bitmap
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/Lua
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/Levels
|
||||
)
|
||||
add_custom_command(TARGET CorsixTH
|
||||
POST_BUILD
|
||||
COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude *.bmp -exclude *.png -resolve-src-symlinks ${corsixth_bundle_resources} \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME}/Contents/Resources
|
||||
)
|
||||
#Add an extra step at the end of the build process to copy the resources into the bundle.
|
||||
add_custom_command(TARGET CorsixTH
|
||||
POST_BUILD
|
||||
COMMAND rsync -rv --include-from ${CMAKE_SOURCE_DIR}/CorsixTH/RequiredResources.txt ${CMAKE_SOURCE_DIR}/CorsixTH/ \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME}/Contents/Resources)
|
||||
|
||||
target_link_libraries(CorsixTH SDLmain)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/CorsixTH/SDLMain/)
|
||||
@@ -221,7 +213,7 @@ IF(APPLE)
|
||||
install(DIRECTORY ${LUA_LIBRARY} DESTINATION CorsixTH.app/Contents/Frameworks)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
ELSE()
|
||||
install(TARGETS CorsixTH RUNTIME DESTINATION CorsixTH)
|
||||
install(DIRECTORY Lua Levels DESTINATION CorsixTH PATTERN "*.svn" EXCLUDE)
|
||||
|
Binary file not shown.
18
CorsixTH/RequiredResources.txt
Normal file
18
CorsixTH/RequiredResources.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
# rsync compatible filter file which is used post-build
|
||||
# to help with copying the required resources into the
|
||||
# bundles for the Mac build.
|
||||
|
||||
- .svn
|
||||
- .DS_Store
|
||||
- CVS
|
||||
+ CorsixTH.lua
|
||||
+ Lua/
|
||||
+ Lua/**
|
||||
+ Levels/
|
||||
+ Levels/*
|
||||
+ Bitmap/
|
||||
+ Bitmap/aux_ui.*
|
||||
+ Bitmap/tree_ctrl.*
|
||||
+ Bitmap/mainmenu1080.dat
|
||||
+ Bitmap/mainmenu1080.pal
|
||||
- *
|
@@ -24,7 +24,7 @@ FILE(GLOB_RECURSE mapedit_source_files
|
||||
IF(APPLE)
|
||||
add_definitions(-DIS_MAPEDIT_APP)
|
||||
|
||||
set(corsixth_icon_file ${CMAKE_SOURCE_DIR}/CorsixTH/Icon.icns)
|
||||
set(corsixth_icon_file ${CMAKE_SOURCE_DIR}/MapEdit/Icon.icns)
|
||||
set_source_files_properties(
|
||||
${corsixth_icon_file}
|
||||
PROPERTIES
|
||||
@@ -39,19 +39,12 @@ IF(APPLE)
|
||||
)
|
||||
|
||||
set_target_properties(MapEdit PROPERTIES LINK_FLAGS_MINSIZEREL "-dead_strip")
|
||||
set_target_properties(MapEdit PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks")
|
||||
|
||||
#Add an extra step at the end of the build process to copy the resources into the
|
||||
#bundle. I haven't yet found a way to keep the folder structure when adding resources
|
||||
#into XCode. I would have thought we could use source_group but apparently not.
|
||||
set(corsixth_bundle_resources
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/CorsixTH.lua
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/Bitmap
|
||||
${CMAKE_SOURCE_DIR}/CorsixTH/Lua
|
||||
)
|
||||
add_custom_command(TARGET MapEdit
|
||||
POST_BUILD
|
||||
COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks ${corsixth_bundle_resources} \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME}/Contents/Resources
|
||||
)
|
||||
#Add an extra step at the end of the build process to copy the resources into the bundle.
|
||||
add_custom_command(TARGET MapEdit
|
||||
POST_BUILD
|
||||
COMMAND rsync -rv --include-from ${CMAKE_SOURCE_DIR}/MapEdit/RequiredResources.txt ${CMAKE_SOURCE_DIR}/CorsixTH/ \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME}/Contents/Resources)
|
||||
|
||||
ELSE()
|
||||
add_executable(MapEdit
|
||||
|
BIN
MapEdit/Icon.icns
Normal file
BIN
MapEdit/Icon.icns
Normal file
Binary file not shown.
14
MapEdit/RequiredResources.txt
Normal file
14
MapEdit/RequiredResources.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
# rsync compatible filter file which is used post-build
|
||||
# to help with copying the required resources into the
|
||||
# bundles for the Mac build.
|
||||
|
||||
- .svn
|
||||
- .DS_Store
|
||||
- CVS
|
||||
+ CorsixTH.lua
|
||||
+ Lua/
|
||||
+ Lua/**
|
||||
+ Bitmap/
|
||||
+ Bitmap/*.png
|
||||
+ Bitmap/aux_ui.*
|
||||
- *
|
Reference in New Issue
Block a user