tools/CMakeLists.txt
author koda
Thu, 29 Oct 2009 23:59:46 +0000
changeset 2593 dd995a9c8871
parent 2550 3f84392522cf
child 2641 b08cafb86797
permissions -rw-r--r--
add an uninstall target (to be tested) workaround for a bug with mac sdl_image
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2593
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     1
if (NOT APPLE)
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     2
CONFIGURE_FILE(
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     3
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     4
  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     5
  IMMEDIATE @ONLY)
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     6
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     7
ADD_CUSTOM_TARGET(uninstall
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     8
  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     9
endif()
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
    10
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    11
if (APPLE AND BUNDLE)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    12
2547
koda
parents: 2546
diff changeset
    13
find_package(OGGVORBIS REQUIRED)
2550
3f84392522cf last minute fixes
koda
parents: 2547
diff changeset
    14
find_package(SPARKLE)
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    15
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    16
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    17
if(NOT macdeployqt_EXE)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    18
	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
    19
endif()
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    20
2220
110266ba2ef7 -new openal api for setting sound position
koda
parents: 2219
diff changeset
    21
#dummy target, we're interested in the postscript
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    22
add_custom_target(bundle)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    23
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    24
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
    25
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    26
set(frameworks_dir ${bundle_name}/Contents/Frameworks/)
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
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}")
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    29
2547
koda
parents: 2546
diff changeset
    30
if(SPARKLE_FOUND)
koda
parents: 2546
diff changeset
    31
	set(SPARKLE_FOUND 1)
koda
parents: 2546
diff changeset
    32
else()
koda
parents: 2546
diff changeset
    33
	set(SPARKLE_FOUND 0)
koda
parents: 2546
diff changeset
    34
endif()
koda
parents: 2546
diff changeset
    35
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    36
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
    37
2401
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    38
endif(APPLE AND BUNDLE)