tools/CMakeLists.txt
author koda
Mon, 26 Oct 2009 10:39:20 +0000
changeset 2591 c6597b65caea
parent 2550 3f84392522cf
child 2593 dd995a9c8871
permissions -rw-r--r--
other controls implementation + sdlh revisited (once again)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     1
if (APPLE AND BUNDLE)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     2
2547
koda
parents: 2546
diff changeset
     3
find_package(OGGVORBIS REQUIRED)
2550
3f84392522cf last minute fixes
koda
parents: 2547
diff changeset
     4
find_package(SPARKLE)
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     5
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     6
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     7
if(NOT macdeployqt_EXE)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     8
	message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!")
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
     9
endif()
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    10
2220
110266ba2ef7 -new openal api for setting sound position
koda
parents: 2219
diff changeset
    11
#dummy target, we're interested in the postscript
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    12
add_custom_target(bundle)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    13
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    14
set_target_properties(bundle PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    15
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    16
set(frameworks_dir ${bundle_name}/Contents/Frameworks/)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    17
2401
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    18
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}")
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    19
2547
koda
parents: 2546
diff changeset
    20
if(SPARKLE_FOUND)
koda
parents: 2546
diff changeset
    21
	set(SPARKLE_FOUND 1)
koda
parents: 2546
diff changeset
    22
else()
koda
parents: 2546
diff changeset
    23
	set(SPARKLE_FOUND 0)
koda
parents: 2546
diff changeset
    24
endif()
koda
parents: 2546
diff changeset
    25
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    26
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    27
2401
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    28
endif(APPLE AND BUNDLE)