Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 62 | set ( CMAKE_MODULE_PATH | |||
---|---|---|---|---|---|
67 | ${CMAKE_CURRENT_SOURCE_DIR}/cmake_scripts | 67 | ${CMAKE_CURRENT_SOURCE_DIR}/cmake_scripts | ||
68 | ${CMAKE_MODULE_PATH} | 68 | ${CMAKE_MODULE_PATH} | ||
69 | ) | 69 | ) | ||
70 | 70 | | |||
71 | # add cmake macros | 71 | # add cmake macros | ||
72 | include(GenerateExportHeader) | 72 | include(GenerateExportHeader) | ||
73 | include( MarbleMacros ) | 73 | include( MarbleMacros ) | ||
74 | 74 | | |||
75 | # Generate a standalone app bundle when building on Apple's Mac OS | ||||
76 | # unset this to do a build that uses and provides shared libraries and other | ||||
77 | # resources in a more unix-traditional layout (e.g. for MacPorts, Fink, HomeBrew etc.) | ||||
78 | if(APPLE) | ||||
79 | option(APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Apple Mac" ON) | ||||
80 | add_feature_info("App Bundle" APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Apple Mac.") | ||||
81 | endif(APPLE) | ||||
82 | | ||||
75 | #################################################### | 83 | #################################################### | ||
76 | # Generate the tiles with the tilecreator at compile time | 84 | # Generate the tiles with the tilecreator at compile time | ||
77 | # if this option is set, srtm.jpg will not be installed but the generated tiles instead | 85 | # if this option is set, srtm.jpg will not be installed but the generated tiles instead | ||
78 | option(MOBILE "Create a Marble version optimized for handheld devices") | 86 | option(MOBILE "Create a Marble version optimized for handheld devices") | ||
79 | 87 | | |||
80 | #################################################### | 88 | #################################################### | ||
81 | # Build a D-Bus interface for the Marble widget | 89 | # Build a D-Bus interface for the Marble widget | ||
82 | # This is disabled by default for all win32, apple and Android | 90 | # This is disabled by default for all win32, apple and Android | ||
83 | if(WIN32 OR APPLE OR CMAKE_SYSTEM_NAME STREQUAL Android) | 91 | if(WIN32 OR APPLE_STANDALONE_BUNDLE OR CMAKE_SYSTEM_NAME STREQUAL Android) | ||
84 | option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" OFF) | 92 | option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" OFF) | ||
85 | else() | 93 | else() | ||
86 | option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" ON) | 94 | option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" ON) | ||
87 | endif() | 95 | endif() | ||
88 | 96 | | |||
89 | 97 | | |||
90 | ####################################################### | 98 | ####################################################### | ||
91 | # Specific options for building for different platforms | 99 | # Specific options for building for different platforms | ||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 194 | if(WIN32) | |||
187 | set(data_dir data) | 195 | set(data_dir data) | ||
188 | set(locale_dir "${data_dir}/locale") | 196 | set(locale_dir "${data_dir}/locale") | ||
189 | set(plugin_dir plugins) | 197 | set(plugin_dir plugins) | ||
190 | elseif(APPLE) | 198 | elseif(APPLE) | ||
191 | # needed for finding bundle path in e.g. katlasdir.h | 199 | # needed for finding bundle path in e.g. katlasdir.h | ||
192 | FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices ) | 200 | FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices ) | ||
193 | MARK_AS_ADVANCED (APP_SERVICES_LIBRARY) | 201 | MARK_AS_ADVANCED (APP_SERVICES_LIBRARY) | ||
194 | SET(MAC_EXTRA_LIBS ${APP_SERVICES_LIBRARY}) | 202 | SET(MAC_EXTRA_LIBS ${APP_SERVICES_LIBRARY}) | ||
203 | if(APPLE_STANDALONE_BUNDLE) | ||||
195 | # for Mac OS X, everything is put inside an application bundle | 204 | # for Mac OS X, everything is put inside an application bundle | ||
196 | SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/) | 205 | SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/) | ||
197 | # path for library references | 206 | # path for library references | ||
198 | SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib) | 207 | SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib) | ||
199 | # install the Info.plist file | 208 | # install the Info.plist file | ||
200 | install(FILES src/mac/Info.plist DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents) | 209 | install(FILES src/mac/Info.plist DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents) | ||
201 | #SET (lib_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) | 210 | #SET (lib_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) | ||
202 | SET (data_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/data) | 211 | SET (data_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/data) | ||
203 | set(locale_dir "${data_dir}/locale") | 212 | set(locale_dir "${data_dir}/locale") | ||
204 | SET (plugin_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/plugins) | 213 | SET (plugin_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/plugins) | ||
214 | else(APPLE_STANDALONE_BUNDLE) | ||||
215 | set(data_dir ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/data) | ||||
216 | set(locale_dir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale") | ||||
217 | set(plugin_dir ${CMAKE_INSTALL_FULL_LIBDIR}/marble/plugins) | ||||
218 | set(CMAKE_MODULES_INSTALL_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/cmake) | ||||
219 | endif(APPLE_STANDALONE_BUNDLE) | ||||
205 | elseif(CMAKE_SYSTEM_NAME STREQUAL Android) | 220 | elseif(CMAKE_SYSTEM_NAME STREQUAL Android) | ||
206 | set(plugin_dir "${CMAKE_INSTALL_PREFIX}/assets/plugins") | 221 | set(plugin_dir "${CMAKE_INSTALL_PREFIX}/assets/plugins") | ||
207 | set(data_dir "${CMAKE_INSTALL_PREFIX}/assets/data") | 222 | set(data_dir "${CMAKE_INSTALL_PREFIX}/assets/data") | ||
208 | set(locale_dir "${data_dir}/locale") | 223 | set(locale_dir "${data_dir}/locale") | ||
209 | else() # Linux / bsd etc... | 224 | else() # Linux / bsd etc... | ||
210 | set(data_dir ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/data) | 225 | set(data_dir ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/data) | ||
211 | set(locale_dir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale") | 226 | set(locale_dir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale") | ||
212 | set(plugin_dir ${CMAKE_INSTALL_FULL_LIBDIR}/marble/plugins) | 227 | set(plugin_dir ${CMAKE_INSTALL_FULL_LIBDIR}/marble/plugins) | ||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |