Skip to content

Commit

Permalink
Build for mac platform #777
Browse files Browse the repository at this point in the history
Add Main.storyboard
  • Loading branch information
timi-liuliang committed Oct 6, 2020
1 parent 8bcaab8 commit 66c0e8e
Show file tree
Hide file tree
Showing 3 changed files with 726 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/mac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ ENDMACRO(ADD_FRAMEWORK)
# Get all project files recursively
FILE(GLOB_RECURSE HEADER_FILES *.h *.inl)
FILE(GLOB_RECURSE SOURCE_FILES *.cpp *.m *.mm)
FILE(GLOB_RECURSE STORYBOARD_FILES *.storyboard)

SET(ALL_FILES ${HEADER_FILES} ${SOURCE_FILES})
SET(ALL_FILES ${HEADER_FILES} ${SOURCE_FILES} ${STORYBOARD_FILES})

# group source files
GROUP_FILES(ALL_FILES ${CMAKE_CURRENT_SOURCE_DIR})

# iOS platorm resources
# Mac platorm resources
SET(MAC_RESOURCE_FILES
${MODULE_PATH}/resources/mac/App.icns
${MODULE_PATH}/resources/data
Expand All @@ -47,7 +48,7 @@ SET(FRAMEWORKS "${FRAMEWORKS} -ObjC")
SET(CMAKE_EXE_LINKER_FLAGS ${FRAMEWORKS})
SET(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD}")

ADD_EXECUTABLE(${MODULE_NAME} MACOSX_BUNDLE ${HEADER_FILES} ${SOURCE_FILES} ${MAC_RESOURCE_FILES} CMakeLists.txt)
ADD_EXECUTABLE(${MODULE_NAME} MACOSX_BUNDLE ${ALL_FILES} ${MAC_RESOURCE_FILES} CMakeLists.txt)

# Link Library
TARGET_LINK_LIBRARIES(${MODULE_NAME} engine)
Expand All @@ -60,6 +61,7 @@ SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_
SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_COPY_PHASE_STRIP No)
SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep")
SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/mac/Info.plist)
SET_TARGET_PROPERTIES(${MODULE_NAME} PROPERTIES RESOURCE ${STORYBOARD_FILES})

# Messages
MESSAGE(STATUS "Configure Mac App success!")
Loading

0 comments on commit 66c0e8e

Please # to comment.