X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=CMakeLists.txt;h=fe7c8b683def7a80e24aa7414edb7c8ae78c7b5f;hb=c0b15f1948af3f6410fa59809603716cbae8dbfd;hp=aafeabb9715de8f7781571c0b810db47b147ef67;hpb=19c46ec32d17761dae92c26428102ff58983c31e;p=lugaru.git diff --git a/CMakeLists.txt b/CMakeLists.txt index aafeabb..fe7c8b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,11 +31,21 @@ if(MINGW) endif(MINGW) if(APPLE) - set(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE) + set(CMAKE_OSX_ARCHITECTURES "i386;ppc" CACHE STRING "Build architectures for OSX") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING - "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value" FORCE) + "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value") set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk" CACHE PATH - "The product will be built against the headers and libraries located inside the indicated SDK." FORCE) + "The product will be built against the headers and libraries located inside the indicated SDK.") +endif(APPLE) + +if(APPLE) + # Save our sanity; Set all available libraries to internal by default + set(LUGARU_FORCE_INTERNAL_SDL True) + set(LUGARU_FORCE_INTERNAL_GLU True) + set(LUGARU_FORCE_INTERNAL_JPEG True) + set(LUGARU_FORCE_INTERNAL_PNG True) + set(LUGARU_FORCE_INTERNAL_VORBIS True) + set(LUGARU_FORCE_INTERNAL_ZLIB True) endif(APPLE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") @@ -181,6 +191,10 @@ if(WIN32) include_directories("${DEPDIR}/OpenGL") endif(WIN32) +if(MSVC) # More Visual Studio annoyances + include_directories("${DEPDIR}/msinttypes") +endif(MSVC) + option (LUGARU_FORCE_INTERNAL_OPENAL "Force internal libOpenAL, even if there's a system version" False) if (NOT LUGARU_FORCE_INTERNAL_OPENAL) find_package(OpenAL REQUIRED) @@ -465,16 +479,6 @@ if (NOT OGGVORBIS_FOUND) ) endif (NOT OGGVORBIS_FOUND) -if(APPLE) - # Save our sanity; Set all available libraries to internal by default - set(LUGARU_FORCE_INTERNAL_SDL True) - set(LUGARU_FORCE_INTERNAL_GLU True) - set(LUGARU_FORCE_INTERNAL_JPEG True) - set(LUGARU_FORCE_INTERNAL_PNG True) - set(LUGARU_FORCE_INTERNAL_VORBIS True) - set(LUGARU_FORCE_INTERNAL_ZLIB True) -endif(APPLE) - include_directories( ${OPENAL_INCLUDE_DIR} ${JPEG_INCLUDE_DIR} @@ -538,7 +542,13 @@ else(WIN32) endif(APPLE AND LUGARU_HAS_INTERNAL_SDL) endif(WIN32) +if(NOT APPLE) install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX}) +endif(NOT APPLE) + +if(APPLE) +install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${APPS_ROOT}) +endif(APPLE) if (LUGARU_MISSING_DEPS) message(STATUS "Using our copy of these libs: ${LUGARU_MISSING_DEPS}")