Mercurial > almixer_isolated
annotate CMakeLists.txt @ 5:8cb13d89451a
Doxygen support and fixes.
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Thu, 28 Oct 2010 01:26:11 -0700 |
parents | 26aec5629f68 |
children | ee50db043251 |
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}) |
4
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
85 ELSE(WANTS_BUILD_SHARED_LIBRARY) |
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
86 ADD_LIBRARY(ALMIXER_LIBRARY STATIC ${PUBLIC_HEADERS} ${ALMIXER_SOURCE} ${RESOURCE_FILES}) |
3
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
87 ENDIF(WANTS_BUILD_SHARED_LIBRARY) |
4
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
88 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES OUTPUT_NAME "ALmixer") |
3
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
89 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
90 # Set Dynamic Library and Framework properties |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
91 IF(WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
92 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
93 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
94 FRAMEWORK TRUE |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
95 FRAMEWORK_VERSION "${ALMIXER_FRAMEWORK_VERSION_NUMBER}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
96 # PRIVATE_HEADER "fooPrivate.h;fooBoth.h" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
97 PUBLIC_HEADER "${PUBLIC_HEADERS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
98 RESOURCE "${RESOURCE_FILES}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
99 # INSTALL_NAME_DIR ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
100 # BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
101 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
102 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
103 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
104 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
105 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
106 # 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
|
107 # 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
|
108 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
|
109 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
|
110 # 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
|
111 # 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
|
112 # 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
|
113 # 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
|
114 # disable the switch. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
115 IF(CMAKE_FRAMEWORK_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
116 # MESSAGE("got dir ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
117 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
|
118 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
119 ELSE(CMAKE_FRAMEWORK_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
120 # MESSAGE("no dir ${CMAKE_FRAMEWORK_INSTALL_NAME_DIR}") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
121 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
|
122 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
123 ENDIF(CMAKE_FRAMEWORK_INSTALL_NAME_DIR) |
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 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
126 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
127 # 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
|
128 # the user sees in an information panel. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
129 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
|
130 # Bundle version is the version the OS looks at. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
131 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
|
132 SET(MACOSX_FRAMEWORK_IDENTIFIER "net.playcontrol.almixer") |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
133 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
134 ELSEIF(WANTS_BUILD_SHARED_LIBRARY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
135 IF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
136 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
137 FRAMEWORK FALSE |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
138 # INSTALL_NAME_DIR ${CMAKE_DYLIB_INSTALL_NAME_DIR} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
139 # BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
140 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
141 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
142 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
143 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
144 # 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
|
145 # 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
|
146 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
|
147 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
|
148 # 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
|
149 # 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
|
150 # 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
|
151 # 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
|
152 # disable the switch. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
153 IF(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 ${CMAKE_BUILD_WITH_INSTALL_RPATH}) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
155 ELSE(CMAKE_DYLIB_INSTALL_NAME_DIR) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
156 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
|
157 ENDIF(CMAKE_DYLIB_INSTALL_NAME_DIR) |
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 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
160 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
161 ELSEIF(UNIX) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
162 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
163 INSTALL_RPATH ${CMAKE_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
164 BUILD_WITH_INSTALL_RPATH ${CMAKE_BUILD_WITH_INSTALL_RPATH} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
165 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
166 SOVERSION ${ALMIXER_SOVERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
167 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
168 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
169 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
170 ELSEIF(WIN32) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
171 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
172 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
173 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
174 # COMPILE_FLAGS "${ALMIXER_C_FLAGS} -DALMIXER_BUILD_AS_DLL" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
175 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
176 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
177 ELSE(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
178 SET_TARGET_PROPERTIES(ALMIXER_LIBRARY PROPERTIES |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
179 VERSION ${ALMIXER_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
180 SOVERSION ${ALMIXER_COMPATIBILITY_VERSION} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
181 # COMPILE_FLAGS "${ALMIXER_C_FLAGS}" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
182 ) |
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 ENDIF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
185 |
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 ENDIF(WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
188 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
189 INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) |
4
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
190 TARGET_LINK_LIBRARIES(ALMIXER_LIBRARY ${OPENAL_LIBRARY} ${SDL_SOUND_LIBRARIES} ${SDL_LIBRARY}) |
3
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 |
5
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
193 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
194 # For Doxygen |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
195 # This will find the Doxygen stuff on your system if you want it. |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
196 # I need to use my version because the official version doesn't |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
197 # understand the OS X version of Doxygen. It also doesn't define |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
198 # DOT_PATH which is a problem if dot is not in the path. |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
199 INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
200 #INCLUDE(${PROJECT_SOURCE_DIR}/CMakeModules/Documentation.cmake OPTIONAL) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
201 OPTION(BUILD_DOCUMENTATION "Build Almixer reference documentation using doxygen (use: make DoxygenDoc)" OFF) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
202 MARK_AS_ADVANCED(CLEAR BUILD_DOCUMENTATION) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
203 # To build the documention, you will have to enable it |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
204 # and then do the equivalent of "make DoxygenDoc". |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
205 IF(BUILD_DOCUMENTATION) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
206 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
207 OPTION(BUILD_REF_DOCS_SEARCHENGINE "Enable doxygen's search engine (requires that documentation to be installed on a php enabled web server)" OFF) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
208 IF(BUILD_REF_DOCS_SEARCHENGINE) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
209 SET(SEARCHENGINE YES) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
210 ELSE() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
211 SET(SEARCHENGINE NO) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
212 ENDIF() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
213 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
214 OPTION(BUILD_REF_DOCS_TAGFILE "Generate a tag file named osg.tag on the documentation web server" OFF) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
215 IF(BUILD_REF_DOCS_TAGFILE) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
216 SET(GENERATE_TAGFILE "${PROJECT_BINARY_DIR}/doc/ALmixerDocumentation/ALmixer.tag") |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
217 ELSE() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
218 SET(GENERATE_TAGFILE "") |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
219 ENDIF() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
220 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
221 IF(DOT) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
222 SET(HAVE_DOT YES) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
223 ELSE() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
224 SET(HAVE_DOT NO) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
225 ENDIF() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
226 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
227 # If html help generation was requested. DOCUMENTATION_HTML_HELP is defined by Documentation.cmake |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
228 SET(GENERATE_HTMLHELP "NO") |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
229 IF(DOCUMENTATION_HTML_HELP) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
230 # on windows Documentation.cmake finds the html help workshop fi it exists. On u*ix we might have it with wine but no way to point it out |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
231 IF(NOT WIN32) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
232 SET(HTML_HELP_COMPILER "" CACHE FILEPATH "Enter location of the HTML help compiler to let doxygen compile html") |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
233 MARK_AS_ADVANCED(HTML_HELP_COMPILER) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
234 ENDIF() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
235 # this var sets a proper value in .doxygen files when coniguring them below |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
236 SET(GENERATE_HTMLHELP "YES") |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
237 endif() |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
238 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
239 # This processes our doxyfile.cmake and substitutes paths to generate |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
240 # a final Doxyfile |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
241 CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/ALmixer.doxyfile.cmake |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
242 ${PROJECT_BINARY_DIR}/doc/ALmixer.doxyfile |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
243 ) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
244 # INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/ALmixerDocumentation DESTINATION doc COMPONENT ALmixer-doc) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
245 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
246 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
247 # This creates a new target to build documentation. |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
248 # It runs ${DOXYGEN} which is the full path and executable to |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
249 # Doxygen on your system, set by the FindDoxygen.cmake module |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
250 # (called by FindDocumentation.cmake). |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
251 # It runs the final generated Doxyfile against it. |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
252 # The DOT_PATH is substituted into the Doxyfile. |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
253 ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
254 ${PROJECT_BINARY_DIR}/doc/ALmixer.doxyfile |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
255 ) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
256 ENDIF(BUILD_DOCUMENTATION) |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
257 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
258 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
259 |
8cb13d89451a
Doxygen support and fixes.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
4
diff
changeset
|
260 |
3
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
261 # Install commands below |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
262 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
|
263 # 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
|
264 INSTALL(TARGETS |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
265 ALMIXER_LIBRARY |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
266 FRAMEWORK DESTINATION ${CMAKE_FRAMEWORK_INSTALL_DIR} |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
267 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
268 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
|
269 INSTALL(TARGETS |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
270 ALMIXER_LIBRARY |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
271 LIBRARY DESTINATION lib |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
272 ARCHIVE DESTINATION lib |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
273 PUBLIC_HEADER DESTINATION include |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
274 ) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
275 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
|
276 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
277 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
278 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
279 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
280 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
281 # 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
|
282 CONFIGURE_FILE( |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
283 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
284 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
285 IMMEDIATE @ONLY) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
286 ADD_CUSTOM_TARGET(uninstall |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
287 "${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
|
288 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
289 |
4
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
290 # The Examples |
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
291 ADD_SUBDIRECTORY(EXAMPLES) |
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
292 |
26aec5629f68
Added example programs.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
3
diff
changeset
|
293 |
3
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
294 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
295 # 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
|
296 # 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
|
297 IF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
298 # 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
|
299 # 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
|
300 # 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
|
301 # will overwrite any changes the user sets. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
302 # 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
|
303 # 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
|
304 IF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
305 # 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
|
306 # version information we need. (Darwin versions can be changed |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
307 # independently of OS X versions.) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
308 # 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
|
309 IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
310 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
|
311 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
|
312 ELSE(EXISTS /Developer/SDKs/MacOSX10.5.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
313 IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
314 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
|
315 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
|
316 ELSE(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
317 # No Universal Binary support |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
318 # 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
|
319 # but the SDK detection is too unreliable here. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
320 ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
321 ENDIF(EXISTS /Developer/SDKs/MacOSX10.5.sdk) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
322 ENDIF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
323 ENDIF(APPLE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
324 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
325 # 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
|
326 # advantage of this. |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
327 IF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
328 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
|
329 ENDIF(NOT ALMIXER_CONFIG_HAS_BEEN_RUN_BEFORE) |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
330 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
331 |
a929285e1db0
Added CMake build system.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff
changeset
|
332 |