tools/CMakeLists.txt
author nemo
Tue, 09 Feb 2010 03:21:09 +0000
changeset 2776 9572aae13d49
parent 2641 b08cafb86797
child 4335 c279aeb615df
permissions -rw-r--r--
Only enable chirp for room owner
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)
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
     2
	CONFIGURE_FILE(
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
     3
		"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
     4
		"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
     5
		IMMEDIATE @ONLY)
2593
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     6
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
     7
	ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
2593
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     8
endif()
dd995a9c8871 add an uninstall target (to be tested)
koda
parents: 2550
diff changeset
     9
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    10
if (APPLE AND BUNDLE)
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    11
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    12
	find_package(Qt4 REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    13
	find_package(SDL REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    14
	find_package(SDL_image REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    15
	find_package(SDL_net REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    16
	find_package(SDL_ttf REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    17
	find_package(SDL_mixer REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    18
	find_package(OGGVORBIS REQUIRED)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    19
	find_package(SPARKLE)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    20
	find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac)
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    21
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    22
	if(NOT macdeployqt_EXE)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    23
		message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!")
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    24
	endif()
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    25
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    26
	#dummy target, we're interested in the postscript file
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    27
	add_custom_target(bundle)
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    28
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    29
	set_target_properties(bundle PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    30
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    31
	set(frameworks_dir ${bundle_name}/Contents/Frameworks/)
2401
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    32
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    33
	string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}")
2547
koda
parents: 2546
diff changeset
    34
2641
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    35
	if(SPARKLE_FOUND)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    36
		set(SPARKLE_FOUND 1)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    37
	else()
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    38
		set(SPARKLE_FOUND 0)
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    39
	endif()
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    40
b08cafb86797 some tweaks in the mac compilation system
koda
parents: 2593
diff changeset
    41
	CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
2219
07f5345ecae7 additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff changeset
    42
2401
2a694ea2a437 fixes & co.
koda
parents: 2220
diff changeset
    43
endif(APPLE AND BUNDLE)