From: Harley Laue Date: Tue, 11 May 2010 21:50:02 +0000 (-0500) Subject: Quickly created CMake to build the source X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=2e284d5574d29547f984cd625a76ef6266050abf;p=lugaru.git Quickly created CMake to build the source * The next commit will most likely be required to actually be able to compile the sources correctly (or have a chance at it) --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c87964e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +project(lugaru) + +cmake_minimum_required(VERSION 2.6) + +find_package(OpenAL REQUIRED) +find_package(BZip2 REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(ZLIB REQUIRED) +find_package(OpenGL REQUIRED) +find_package(GLU REQUIRED) +find_package(SDL REQUIRED) + +include_directories( + ${OPENAL_INCLUDES} + ${BZIP2_INCLUDE_DIR} + ${JPEG_INCLUDE_DIR} + ${PNG_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIR} + ${OPENGL_INCLUDE_DIR} + ${GLU_INCLUDE_DIR} + ${SDL_INCLUDE_DIR} + ${CMAKE_SOURCE_DIR}/Source) + +set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} -lvorbisfile -logg) + +add_subdirectory(Source) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt new file mode 100644 index 0000000..0e8e9ba --- /dev/null +++ b/Source/CMakeLists.txt @@ -0,0 +1,117 @@ +set(LUGARU_SRCS + Frustum.cpp + GameDraw.cpp + GameInitDispose.cpp + GameTick.cpp + Globals.cpp + Lights.cpp + Models.cpp + Objects.cpp + OpenGL_Full_Screen.cpp + OpenGL_Windows.cpp + Person.cpp + Quaternions.cpp + Random.c + Skeleton.cpp + Skybox.cpp + Sprites.cpp + TGALoader.cpp + Terrain.cpp + Text.cpp + Weapons.cpp + WinInput.cpp + mmgr.cpp + nsp_network.c + openal_wrapper.cpp + pack.c + pack_private.c + private.c + unpack.c + unpack_private.c) + +set(LUGARU_SRCS + Frustum.cpp + GameDraw.cpp + GameInitDispose.cpp + GameTick.cpp + Globals.cpp + Lights.cpp + Models.cpp + Objects.cpp + pack.c + pack_private.c + Person.cpp + private.c + Quaternions.cpp + Random.c + Skeleton.cpp + Skybox.cpp + Sprites.cpp + Terrain.cpp + Text.cpp + TGALoader.cpp + unpack.c + unpack_private.c + Weapons.cpp + MacCompatibility.cpp + logger/logger.cpp + OpenGL_Windows.cpp + openal_wrapper.cpp + WinInput.cpp) + +set(LUGARU_H + Constants.h + Frustum.h + Game.h + Lights.h + LinkedList.h + MacCompatibility.h + MacInput.h + Models.h + MoreFilesX.h + Objects.h + Person.h + PhysicsMath.h + Pointer.h + Quaternions.h + Random.h + Skeleton.h + Skybox.h + Sprites.h + TGALoader.h + Terrain.h + Text.h + Weapons.h + WinInput.h + alstubs.h + binio.h + fmod.h + fmod_errors.h + fmod_header.h + fmoddyn.h + gamegl.h + glstubs.h + md5.h + mmgr.h + nommgr.h + pack_private.h + private.h + unpack_private.h + wincompat.h) + +if(CMAKE_HOST_APPLE) + set(LUGARU_SRCS + ${LUGARU_SRCS} + MacCompatibility.cpp + MoreFilesX.c + MacInput.cpp) + set(LUGARU_H + ${LUGARU_H} + "Carbon Include.h" + CarbonStdCLib.h) +endif(CMAKE_HOST_APPLE) + +add_executable(lugaru ${LUGARU_SRCS} ${LUGARU_H}) +target_link_libraries(lugaru ${LUGARU_LIBS}) + +add_definitions(-DPLATFORM_LINUX=1 -DPLATFORM_UNIX=1 -DUSE_OPENAL=1 -DUSE_SDL=1 -DBinIO_STDINT_HEADER=)