Mercurial > almixer_isolated
annotate CMakeLists.txt @ 3:a929285e1db0
Added CMake build system.
There are problems with the SDL_sound module due to changes in CMake. Right now they just seem to be warnings, but I am unable to suppress them.
Added license.
Added README.
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Wed, 27 Oct 2010 20:43:14 -0700 |
parents | |
children | 26aec5629f68 |
rev | line source |
---|---|
3
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.4) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
2 # These are all useless <sigh> |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
3 cmake_policy(SET CMP0000 OLD) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
4 cmake_policy(SET CMP0004 OLD) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
5 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
6 PROJECT(ALmixer) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
7 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
8 INCLUDE(CMakeDependentOption) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
9 SET(CPACK_SET_DESTDIR TRUE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
10 INCLUDE(CPack) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
11 FIND_PACKAGE(OpenAL) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
12 FIND_PACKAGE(SDL) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
13 # Note: SDL_sound needs to be updated for 2.6+. You'll get annoying warnings. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
14 FIND_PACKAGE(SDL_sound) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
15 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
16 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
17 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
18 SET(ALMIXER_MAJOR_VERSION 0) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
19 SET(ALMIXER_MINOR_VERSION 1) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
20 SET(ALMIXER_PATCH_VERSION 0) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
21 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
22 SET(ALMIXER_VERSION ${ALMIXER_MAJOR_VERSION}.${ALMIXER_MINOR_VERSION}.${ALMIXER_PATCH_VERSION}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
23 SET(ALMIXER_COMPATIBILITY_VERSION ${ALMIXER_MAJOR_VERSION}.${ALMIXER_MINOR_VERSION}.0) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
24 # ??? Don't know |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
25 SET(ALMIXER_SOVERSION ${ALMIXER_MAJOR_VERSION}.${ALMIXER_MINOR_VERSION}.0) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
26 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
27 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
28 OPTION(WANTS_BUILD_SHARED_LIBRARY "Set to ON to build dynamic library." ON) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
29 #OPTION(ALMIXER_COMPILE_WITHOUT_SDL "Not supported. Don't use" OFF) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
30 OPTION(ENABLE_ALMIXER_THREADS "Use background thread for ALmixer_Update()" OFF) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
31 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
32 IF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
33 CMAKE_DEPENDENT_OPTION(WANTS_BUILD_FRAMEWORK "Set to ON to build framework instead of dylib. Only valid if BUILD_SHARED_LIBRARY is ON an is OS X." ON "WANTS_BUILD_SHARED_LIBRARY" ON) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
34 ENDIF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
35 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
36 SET(ALMIXER_LIBRARY_NAME ALmixer) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
37 IF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
38 SET(CMAKE_FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING "Directory to install frameworks to.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
39 SET(CMAKE_FRAMEWORK_INSTALL_NAME_DIR "@executable_path/../Frameworks" CACHE STRING "install_name path for framework.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
40 #SET(CMAKE_DYLIB_INSTALL_NAME_DIR "" CACHE STRING "install_name path for dylib.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
41 SET(CMAKE_DYLIB_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "install_name path for dylib.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
42 SET(ALMIXER_FRAMEWORK_NAME "${ALMIXER_LIBRARY_NAME}.framework") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
43 SET(ALMIXER_FRAMEWORK_VERSION_NUMBER "A") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
44 SET(ALMIXER_FRAMEWORK_VERSIONED_EXECUTABLE_DIR "Versions/${ALMIXER_FRAMEWORK_VERSION_NUMBER}/MacOS") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
45 SET(ALMIXER_FRAMEWORK_VERSIONED_LIB_DIR "Versions/${ALMIXER_FRAMEWORK_VERSION_NUMBER}/lib") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
46 SET(ALMIXER_FRAMEWORK_CURRENT_EXECUTABLE_DIR "Versions/Current/MacOS") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
47 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
48 # For Apple install_name, is it better to detect if Xcode vs Makefile? |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
49 # Xcode default=1, Makefile=0? Or detect if Framework vs. dylib, |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
50 # Framework=1, dylib=0? |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
51 OPTION(CMAKE_BUILD_WITH_INSTALL_RPATH "Set to YES to set the rpath or install_name on build instead of install." ON) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
52 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
53 ELSEIF(UNIX) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
54 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "rpaths separated by semicolons.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
55 OPTION(CMAKE_BUILD_WITH_INSTALL_RPATH "Set to YES to set the rpath or install_name on build instead of install." OFF) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
56 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
57 ENDIF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
58 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
59 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
60 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
61 SET(ALMIXER_SOURCE |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
62 ${ALmixer_SOURCE_DIR}/ALmixer.c |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
63 ${ALmixer_SOURCE_DIR}/CircularQueue.c |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
64 ${ALmixer_SOURCE_DIR}/CircularQueue.h |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
65 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
66 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
67 SET(PUBLIC_HEADERS |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
68 ${ALmixer_SOURCE_DIR}/ALmixer.h |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
69 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
70 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
71 #SET(RESOURCE_FILES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
72 #) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
73 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
74 ADD_DEFINITIONS(-DALMIXER_BUILD_LIBRARY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
75 IF(ENABLE_ALMIXER_THREADS) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
76 ADD_DEFINITIONS(-DENABLE_ALMIXER_THREADS) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
77 ELSE(ENABLE_ALMIXER_THREADS) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
78 REMOVE_DEFINITIONS(-DENABLE_ALMIXER_THREADS) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
79 ENDIF(ENABLE_ALMIXER_THREADS) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
80 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
81 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
82 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
83 IF(WANTS_BUILD_SHARED_LIBRARY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
84 ADD_LIBRARY(ALMIXER_LIBRARY SHARED ${PUBLIC_HEADERS} ${ALMIXER_SOURCE} ${RESOURCE_FILES}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
85 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES OUTPUT_NAME "ALmixer") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
86 ENDIF(WANTS_BUILD_SHARED_LIBRARY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
87 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
88 # Set Dynamic Library and Framework properties |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
89 IF(WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
90 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
91 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
92 FRAMEWORK TRUE |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
93 FRAMEWORK_VERSION "${ALMIXER_FRAMEWORK_VERSION_NUMBER}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
94 # PRIVATE_HEADER "fooPrivate.h;fooBoth.h" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
95 PUBLIC_HEADER "${PUBLIC_HEADERS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
96 RESOURCE "${RESOURCE_FILES}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
97 # INSTALL_NAME_DIR ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
98 # BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
99 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
100 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
101 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
102 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
103 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
104 # I moved the INSTALL_NAME_DIR to use SET_PROPERTY instead because |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
105 # SET_TARGET_PROPERTIES will fail if the variable is empty. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
106 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY INSTALL_NAME_DIR ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
107 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY BUILD_WITH_INSTALL_RPATH NO) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
108 # If the user deletes the install_name path, use the gcc default |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
109 # and disable the option completely. But CMake by default places |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
110 # the name of the library in the install_name if |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
111 # BUILD_WITH_INSTALL_RPATH is ON. So to avoid this, I need to |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
112 # disable the switch. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
113 IF(CMAKE_FRAMEWORK_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
114 # MESSAGE("got dir ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
115 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
116 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
117 ELSE(CMAKE_FRAMEWORK_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
118 # MESSAGE("no dir ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
119 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY BUILD_WITH_INSTALL_RPATH NO) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
120 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
121 ENDIF(CMAKE_FRAMEWORK_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
122 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
123 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
124 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
125 # Short Version is the "marketing version". It is the version |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
126 # the user sees in an information panel. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
127 SET(MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${ALMIXER_MAJOR_VERSION}.${ALMIXER_MINOR_VERSION}.${ALMIXER_PATCH_VERSION}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
128 # Bundle version is the version the OS looks at. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
129 SET(MACOSX_FRAMEWORK_BUNDLE_VERSION "${ALMIXER_MAJOR_VERSION}.${ALMIXER_MINOR_VERSION}.${ALMIXER_PATCH_VERSION}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
130 SET(MACOSX_FRAMEWORK_IDENTIFIER "net.playcontrol.almixer") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
131 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
132 ELSEIF(WANTS_BUILD_SHARED_LIBRARY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
133 IF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
134 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
135 FRAMEWORK FALSE |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
136 # INSTALL_NAME_DIR ${CMAKE_DYLIB_INSTALL_NAME_DIR} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
137 # BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
138 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
139 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
140 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
141 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
142 # I moved the INSTALL_NAME_DIR to use SET_PROPERTY instead because |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
143 # SET_TARGET_PROPERTIES will fail if the variable is empty. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
144 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY INSTALL_NAME_DIR ${CMAKE_DYLIB_INSTALL_NAME_DIR}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
145 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY BUILD_WITH_INSTALL_RPATH NO) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
146 # If the user deletes the install_name path, use the gcc default |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
147 # and disable the option completely. But CMake by default places |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
148 # the name of the library in the install_name if |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
149 # BUILD_WITH_INSTALL_RPATH is ON. So to avoid this, I need to |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
150 # disable the switch. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
151 IF(CMAKE_DYLIB_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
152 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
153 ELSE(CMAKE_DYLIB_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
154 SET_PROPERTY(TARGET ALMIXER_LIBRARY PROPERTY BUILD_WITH_INSTALL_RPATH OFF) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
155 ENDIF(CMAKE_DYLIB_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
156 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
157 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
158 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
159 ELSEIF(UNIX) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
160 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
161 INSTALL_RPATH ${CMAKE_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
162 BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
163 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
164 SOVERSION ${ALMIXER_SOVERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
165 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
166 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
167 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
168 ELSEIF(WIN32) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
169 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
170 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
171 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
172 # COMPILE_FLAGS "${ALMIXER_C_FLAGS} -DALMIXER_BUILD_AS_DLL" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
173 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
174 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
175 ELSE(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
176 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
177 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
178 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
179 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
180 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
181 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
182 ENDIF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
183 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
184 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
185 ENDIF(WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
186 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
187 INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
188 #TARGET_LINK_LIBRARIES(ALMIXER_LIBRARY "${OPENAL_LIBRARY} ${SDL_LIBRARIES} ${SDL_SOUND_LIBRARIES}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
189 MESSAGE("SDL_libraries: ${SDL_LIBRARY}, ${SDL_SOUND_LIBRARIES}.") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
190 TARGET_LINK_LIBRARIES(ALMIXER_LIBRARY ${OPENAL_LIBRARY} "${SDL_SOUND_LIBRARIES}" ${SDL_LIBRARY}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
191 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
192 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
193 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
194 # Install commands below |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
195 IF(APPLE AND WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
196 # Will install framework to /Library/Frameworks directory or user specified |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
197 INSTALL(TARGETS |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
198 ALMIXER_LIBRARY |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
199 FRAMEWORK DESTINATION ${CMAKE_FRAMEWORK_INSTALL_DIR} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
200 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
201 ELSE(APPLE AND WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
202 INSTALL(TARGETS |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
203 ALMIXER_LIBRARY |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
204 LIBRARY DESTINATION lib |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
205 ARCHIVE DESTINATION lib |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
206 PUBLIC_HEADER DESTINATION include |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
207 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
208 ENDIF(APPLE AND WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
209 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
210 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
211 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
212 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
213 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
214 # For uninstall (needs cmake_uninstall.cmake.in in the top-level directory) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
215 CONFIGURE_FILE( |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
216 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
217 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
218 IMMEDIATE @ONLY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
219 ADD_CUSTOM_TARGET(uninstall |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
220 "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
221 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
222 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
223 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
224 # Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
225 # and 32/64-bit Intel/PPC on >= 10.5. Anything <= 10.3 doesn't support. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
226 IF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
227 # These are just defaults/recommendations, but how we want to build |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
228 # out of the box. But the user needs to be able to change these options. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
229 # So we must only set the values the first time CMake is run, or we |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
230 # will overwrite any changes the user sets. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
231 # FORCE is used because the options are not reflected in the UI otherwise. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
232 # Seems like a good place to add version specific compiler flags too. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
233 IF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
234 # This is really fragile, but CMake doesn't provide the OS system |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
235 # version information we need. (Darwin versions can be changed |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
236 # independently of OS X versions.) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
237 # It does look like CMake handles the CMAKE_OSX_SYSROOT automatically. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
238 IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
239 SET(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
240 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.5" CACHE STRING "Flags used by the compiler during all build types." FORCE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
241 ELSE(EXISTS /Developer/SDKs/MacOSX10.5.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
242 IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
243 SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
244 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.4" CACHE STRING "Flags used by the compiler during all build types." FORCE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
245 ELSE(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
246 # No Universal Binary support |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
247 # Should break down further to set the -mmacosx-version-min, |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
248 # but the SDK detection is too unreliable here. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
249 ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
250 ENDIF(EXISTS /Developer/SDKs/MacOSX10.5.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
251 ENDIF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
252 ENDIF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
253 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
254 # This needs to be run very last so other parts of the scripts can take |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
255 # advantage of this. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
256 IF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
257 SET(ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
258 ENDIF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
259 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
260 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
261 |