Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 7:43:10 PM (13 years ago)
Author:
rgrieder
Message:

Merged revisions 8098 - 8277 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/src/CMakeLists.txt

    r8284 r8285  
    4141#ADD_COMPILER_FLAGS("-DENET_DLL"           WIN32 LINK_ENET_DYNAMIC)
    4242ADD_COMPILER_FLAGS("-DLUA_BUILD_AS_DLL"   WIN32 LINK_LUA5.1_DYNAMIC)
    43 ADD_COMPILER_FLAGS("-DZLIB_DLL"           WIN32 LINK_ZLIB_DYNAMIC)
    4443# If no defines are specified, these libs get linked dynamically
    4544ADD_COMPILER_FLAGS("-DCEGUI_STATIC -DTOLUA_STATIC" WIN32 NOT LINK_CEGUI_DYNAMIC)
     
    139138ENDIF()
    140139
     140SET(ORXONOX_MAIN_FILES Orxonox.cc)
     141
     142# Add special source file for OS X
     143IF(APPLE)
     144  LIST(APPEND ORXONOX_MAIN_FILES OrxonoxMac.mm)
     145ENDIF()
     146
    141147ORXONOX_ADD_EXECUTABLE(orxonox-main
    142148  # When defined as WIN32 this removes the console window on Windows
     
    145151    orxonox
    146152  SOURCE_FILES
    147     Orxonox.cc
     153    ${ORXONOX_MAIN_FILES}
    148154  OUTPUT_NAME orxonox
    149155)
     
    179185ENDIF(MSVC)
    180186
     187# Apple Mac OS X specific build settings
     188IF(APPLE)
     189  # On Apple we need to link to AppKit and Foundation frameworks
     190  TARGET_LINK_LIBRARIES(orxonox-main
     191    "-framework AppKit"
     192    "-framework Foundation"
     193  )
     194
     195  # Post-build step for the creation of the Dev-App bundle
     196  INCLUDE(PrepareDevBundle)
     197  ADD_CUSTOM_COMMAND(
     198    TARGET orxonox-main
     199    POST_BUILD
     200    # Copy the executable into the Orxonox.app
     201    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${ORXONOX_EXECUTABLE_NAME}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
     202    # Copy the dev-build marker file to Orxonox.app
     203    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/orxonox_dev_build.keep_me" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
     204    # Create a shortcut of the application to the root of the build tree
     205    COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app" "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.app"
     206  )
     207ENDIF(APPLE)
     208
    181209#################### Doxygen ####################
    182210
Note: See TracChangeset for help on using the changeset viewer.