endif(MINGW)
if(APPLE)
- set(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
+ set(CMAKE_OSX_ARCHITECTURES "i386;x86_64;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/")
set(LUGARU_SRCS
${SRCDIR}/Frustum.cpp
+ ${SRCDIR}/Account.cpp
+ ${SRCDIR}/Game.cpp
${SRCDIR}/GameDraw.cpp
${SRCDIR}/GameInitDispose.cpp
${SRCDIR}/GameTick.cpp
${SRCDIR}/Models.cpp
${SRCDIR}/Objects.cpp
${SRCDIR}/pack.c
- ${SRCDIR}/pack_private.c
${SRCDIR}/Person.cpp
${SRCDIR}/private.c
${SRCDIR}/Quaternions.cpp
- ${SRCDIR}/Random.c
${SRCDIR}/Skeleton.cpp
${SRCDIR}/Skybox.cpp
- ${SRCDIR}/Sprites.cpp
+ ${SRCDIR}/Sprite.cpp
${SRCDIR}/Terrain.cpp
${SRCDIR}/Text.cpp
${SRCDIR}/TGALoader.cpp
${SRCDIR}/unpack.c
- ${SRCDIR}/unpack_private.c
${SRCDIR}/Weapons.cpp
${SRCDIR}/OpenGL_Windows.cpp
${SRCDIR}/openal_wrapper.cpp
- ${SRCDIR}/WinInput.cpp
+ ${SRCDIR}/Input.cpp
+ ${SRCDIR}/Settings.cpp
+ ${SRCDIR}/Stereo.cpp
+ ${SRCDIR}/Animation.cpp
+ ${SRCDIR}/Sounds.cpp
+ ${SRCDIR}/Awards.cpp
)
set(LUGARU_H
- ${SRCDIR}/Constants.h
${SRCDIR}/Frustum.h
+ ${SRCDIR}/Account.h
${SRCDIR}/Game.h
${SRCDIR}/Lights.h
- ${SRCDIR}/LinkedList.h
${SRCDIR}/Models.h
${SRCDIR}/Objects.h
${SRCDIR}/Person.h
${SRCDIR}/PhysicsMath.h
- ${SRCDIR}/Pointer.h
${SRCDIR}/Quaternions.h
${SRCDIR}/Random.h
${SRCDIR}/Skeleton.h
${SRCDIR}/Skybox.h
- ${SRCDIR}/Sprites.h
+ ${SRCDIR}/Sprite.h
${SRCDIR}/TGALoader.h
${SRCDIR}/Terrain.h
${SRCDIR}/Text.h
${SRCDIR}/Weapons.h
- ${SRCDIR}/WinInput.h
+ ${SRCDIR}/Input.h
${SRCDIR}/alstubs.h
${SRCDIR}/binio.h
${SRCDIR}/openal_wrapper.h
${SRCDIR}/gamegl.h
${SRCDIR}/glstubs.h
- ${SRCDIR}/mmgr.h
- ${SRCDIR}/nommgr.h
- ${SRCDIR}/pack_private.h
${SRCDIR}/private.h
- ${SRCDIR}/unpack_private.h
+ ${SRCDIR}/Settings.h
+ ${SRCDIR}/Stereo.h
+ ${SRCDIR}/Animation.h
+ ${SRCDIR}/Animation.def
+ ${SRCDIR}/Sounds.h
+ ${SRCDIR}/Sounds.def
)
if(UNIX)
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)
)
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}
${CMAKE_SOURCE_DIR}/Source
)
-set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY} ${PLATFORM_LIBS})
+set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${OPENGL_glu_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY} ${PLATFORM_LIBS})
if(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}")