]> git.jsancho.org Git - lugaru.git/blobdiff - CMakeLists.txt
Moved visibleloading check inside LoadingScreen
[lugaru.git] / CMakeLists.txt
index 62a62f29e501b6a47b3e01396aef79676467094a..4b9fb85b54b4cdd62a53272f808ead5b493568b5 100644 (file)
@@ -1,6 +1,6 @@
 project(lugaru)
 
 project(lugaru)
 
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.0)
 cmake_policy(SET CMP0004 OLD)
 
 include(FindPkgConfig)
 cmake_policy(SET CMP0004 OLD)
 
 include(FindPkgConfig)
@@ -27,9 +27,9 @@ set(CMAKE_CXX_FLAGS "-Wall -Wno-parentheses -pedantic --std=c++11 ${CMAKE_CXX_FL
 
 if(APPLE)
     set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")
 
 if(APPLE)
     set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")
-    set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING
+    set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING
         "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value")
         "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.10.sdk" CACHE PATH
+    set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.11.sdk" CACHE PATH
         "The product will be built against the headers and libraries located inside the indicated SDK.")
 endif(APPLE)
 
         "The product will be built against the headers and libraries located inside the indicated SDK.")
 endif(APPLE)
 
@@ -37,7 +37,7 @@ if(LINUX)
     option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF)
 endif(LINUX)
 
     option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF)
 endif(LINUX)
 
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/")
 
 
 ### Sources
 
 
 ### Sources
@@ -66,7 +66,7 @@ set(LUGARU_SRCS
     ${SRCDIR}/Math/Frustum.cpp
     ${SRCDIR}/Math/Quaternions.cpp
     ${SRCDIR}/Menu/Menu.cpp
     ${SRCDIR}/Math/Frustum.cpp
     ${SRCDIR}/Math/Quaternions.cpp
     ${SRCDIR}/Menu/Menu.cpp
-    ${SRCDIR}/Objects/Objects.cpp
+    ${SRCDIR}/Objects/Object.cpp
     ${SRCDIR}/Objects/Person.cpp
     ${SRCDIR}/Objects/Weapons.cpp
     ${SRCDIR}/User/Account.cpp
     ${SRCDIR}/Objects/Person.cpp
     ${SRCDIR}/Objects/Weapons.cpp
     ${SRCDIR}/User/Account.cpp
@@ -82,46 +82,48 @@ set(LUGARU_SRCS
     ${SRCDIR}/GameInitDispose.cpp
     ${SRCDIR}/GameTick.cpp
     ${SRCDIR}/Globals.cpp
     ${SRCDIR}/GameInitDispose.cpp
     ${SRCDIR}/GameTick.cpp
     ${SRCDIR}/Globals.cpp
+    ${SRCDIR}/Tutorial.cpp
 
 )
 
 set(LUGARU_H
 
 )
 
 set(LUGARU_H
-    ${SRCDIR}/Animation/Animation.h
-    ${SRCDIR}/Animation/Joint.h
-    ${SRCDIR}/Animation/Muscle.h
-    ${SRCDIR}/Animation/Skeleton.h
-    ${SRCDIR}/Audio/openal_wrapper.h
-    ${SRCDIR}/Audio/Sounds.h
-    ${SRCDIR}/Devtools/ConsoleCmds.h
-    ${SRCDIR}/Environment/Lights.h
-    ${SRCDIR}/Environment/Skybox.h
-    ${SRCDIR}/Environment/Terrain.h
-    ${SRCDIR}/Graphic/gamegl.h
-    ${SRCDIR}/Graphic/Models.h
-    ${SRCDIR}/Graphic/Sprite.h
-    ${SRCDIR}/Graphic/Stereo.h
-    ${SRCDIR}/Graphic/Text.h
-    ${SRCDIR}/Graphic/Texture.h
-    ${SRCDIR}/Level/Campaign.h
-    ${SRCDIR}/Level/Dialog.h
-    ${SRCDIR}/Level/Hotspot.h
-    ${SRCDIR}/Math/Frustum.h
-    ${SRCDIR}/Math/PhysicsMath.h
-    ${SRCDIR}/Math/Quaternions.h
-    ${SRCDIR}/Math/Random.h
-    ${SRCDIR}/Menu/Menu.h
-    ${SRCDIR}/Objects/Objects.h
-    ${SRCDIR}/Objects/Person.h
-    ${SRCDIR}/Objects/Weapons.h
+    ${SRCDIR}/Animation/Animation.hpp
+    ${SRCDIR}/Animation/Joint.hpp
+    ${SRCDIR}/Animation/Muscle.hpp
+    ${SRCDIR}/Animation/Skeleton.hpp
+    ${SRCDIR}/Audio/openal_wrapper.hpp
+    ${SRCDIR}/Audio/Sounds.hpp
+    ${SRCDIR}/Devtools/ConsoleCmds.hpp
+    ${SRCDIR}/Environment/Lights.hpp
+    ${SRCDIR}/Environment/Skybox.hpp
+    ${SRCDIR}/Environment/Terrain.hpp
+    ${SRCDIR}/Graphic/gamegl.hpp
+    ${SRCDIR}/Graphic/Models.hpp
+    ${SRCDIR}/Graphic/Sprite.hpp
+    ${SRCDIR}/Graphic/Stereo.hpp
+    ${SRCDIR}/Graphic/Text.hpp
+    ${SRCDIR}/Graphic/Texture.hpp
+    ${SRCDIR}/Level/Campaign.hpp
+    ${SRCDIR}/Level/Dialog.hpp
+    ${SRCDIR}/Level/Hotspot.hpp
+    ${SRCDIR}/Math/Frustum.hpp
+    ${SRCDIR}/Math/PhysicsMath.hpp
+    ${SRCDIR}/Math/Quaternions.hpp
+    ${SRCDIR}/Math/Random.hpp
+    ${SRCDIR}/Menu/Menu.hpp
+    ${SRCDIR}/Objects/Object.hpp
+    ${SRCDIR}/Objects/Person.hpp
+    ${SRCDIR}/Objects/Weapons.hpp
     ${SRCDIR}/Thirdparty/optionparser.h
     ${SRCDIR}/Thirdparty/optionparser.h
-    ${SRCDIR}/User/Account.h
-    ${SRCDIR}/User/Settings.h
+    ${SRCDIR}/User/Account.hpp
+    ${SRCDIR}/User/Settings.hpp
     ${SRCDIR}/Utils/binio.h
     ${SRCDIR}/Utils/binio.h
-    ${SRCDIR}/Utils/Folders.h
-    ${SRCDIR}/Utils/ImageIO.h
-    ${SRCDIR}/Utils/Input.h
+    ${SRCDIR}/Utils/Folders.hpp
+    ${SRCDIR}/Utils/ImageIO.hpp
+    ${SRCDIR}/Utils/Input.hpp
     ${SRCDIR}/Utils/private.h
     ${SRCDIR}/Utils/private.h
-    ${SRCDIR}/Game.h
+    ${SRCDIR}/Game.hpp
+    ${SRCDIR}/Tutorial.hpp
 
 )
 
 
 )
 
@@ -132,7 +134,7 @@ if(UNIX)
     )
     set(LUGARU_H
         ${LUGARU_H}
     )
     set(LUGARU_H
         ${LUGARU_H}
-        ${SRCDIR}/MacCompatibility.h
+        ${SRCDIR}/MacCompatibility.hpp
     )
 endif(UNIX)
 
     )
 endif(UNIX)
 
@@ -152,8 +154,8 @@ if(WIN32)
 
     set(LUGARU_H
         ${LUGARU_H}
 
     set(LUGARU_H
         ${LUGARU_H}
-        ${SRCDIR}/WinDefs.h
-        ${SRCDIR}/win-res/resource.h)
+        ${SRCDIR}/WinDefs.hpp
+        ${SRCDIR}/win-res/resource.hpp)
 endif(WIN32)
 
 if(APPLE)
 endif(WIN32)
 
 if(APPLE)
@@ -173,7 +175,13 @@ else(WIN32)
     find_package(OpenAL REQUIRED)
 endif(WIN32)
 
     find_package(OpenAL REQUIRED)
 endif(WIN32)
 
-find_package(sdl2 REQUIRED)
+# macOS has problems with using pkgconfig to find SDL2
+if(APPLE)
+    find_package(sdl2 REQUIRED)
+else(APPLE)
+    pkg_check_modules(SDL2 sdl2 REQUIRED)
+endif(APPLE)
+
 find_package(PNG REQUIRED)
 find_package(JPEG REQUIRED)
 find_package(ZLIB REQUIRED)
 find_package(PNG REQUIRED)
 find_package(JPEG REQUIRED)
 find_package(ZLIB REQUIRED)
@@ -230,7 +238,7 @@ endif(LINUX)
 if(APPLE)
     set(LUGARU_APP_ROOT ${CMAKE_INSTALL_PREFIX}/Lugaru.app)
     set(LUGARU_BINDIR ${LUGARU_APP_ROOT}/Contents/MacOS)
 if(APPLE)
     set(LUGARU_APP_ROOT ${CMAKE_INSTALL_PREFIX}/Lugaru.app)
     set(LUGARU_BINDIR ${LUGARU_APP_ROOT}/Contents/MacOS)
-    set(LUGARU_RESDIR ${LUGARU_APP_ROOT}/Resources)
+    set(LUGARU_RESDIR ${LUGARU_APP_ROOT}/Contents/Resources)
 endif(APPLE)
 
 # Actual installation instructions
 endif(APPLE)
 
 # Actual installation instructions
@@ -282,7 +290,7 @@ endif(LINUX)
 if(APPLE)
     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru DESTINATION ${LUGARU_BINDIR})
     install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${LUGARU_APP_ROOT})
 if(APPLE)
     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru DESTINATION ${LUGARU_BINDIR})
     install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${LUGARU_APP_ROOT})
-    install(FILES ${CMAKE_SOURCE_DIR}/Dist/OSX/lugaru.icns DESTINATION ${LUGARU_RESDIR})
+    install(FILES ${CMAKE_SOURCE_DIR}/Dist/OSX/Lugaru.icns DESTINATION ${LUGARU_RESDIR})
     install(FILES ${CMAKE_SOURCE_DIR}/Dist/OSX/Info.plist DESTINATION ${LUGARU_APP_ROOT}/Contents)
 endif(APPLE)
 
     install(FILES ${CMAKE_SOURCE_DIR}/Dist/OSX/Info.plist DESTINATION ${LUGARU_APP_ROOT}/Contents)
 endif(APPLE)
 
@@ -291,6 +299,10 @@ endif(APPLE)
 install(FILES ${CMAKE_SOURCE_DIR}/AUTHORS
               ${CMAKE_SOURCE_DIR}/CONTENT-LICENSE.txt
               ${CMAKE_SOURCE_DIR}/COPYING.txt
 install(FILES ${CMAKE_SOURCE_DIR}/AUTHORS
               ${CMAKE_SOURCE_DIR}/CONTENT-LICENSE.txt
               ${CMAKE_SOURCE_DIR}/COPYING.txt
-              ${CMAKE_SOURCE_DIR}/DEVTOOLS.txt
               ${CMAKE_SOURCE_DIR}/README.md
               ${CMAKE_SOURCE_DIR}/README.md
+              ${CMAKE_SOURCE_DIR}/RELEASE-NOTES.md
+              ${CMAKE_SOURCE_DIR}/Docs/DEVTOOLS.txt
+              ${CMAKE_SOURCE_DIR}/Docs/README.Empire.txt
+              ${CMAKE_SOURCE_DIR}/Docs/README.SevenTasks.txt
+              ${CMAKE_SOURCE_DIR}/Docs/README.Temple.txt
         DESTINATION ${LUGARU_DOCDIR})
         DESTINATION ${LUGARU_DOCDIR})