]> git.jsancho.org Git - lugaru.git/blobdiff - CMakeLists.txt
Added braces to all statements with clang-tidy and ran clang-format again
[lugaru.git] / CMakeLists.txt
index 044544f13406cdf5fa4c2ec44fb7e6eb9f107b62..d798d41248764aae96c64d062e7d17d6df88da81 100644 (file)
@@ -23,7 +23,7 @@ if(NOT CMAKE_BUILD_TYPE)
 endif(NOT CMAKE_BUILD_TYPE)
 message("CMake build type: ${CMAKE_BUILD_TYPE}")
 
-set(CMAKE_CXX_FLAGS "-Wall -Wno-parentheses -pedantic --std=c++11 ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}")
 
 if(APPLE)
     set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")
@@ -54,6 +54,7 @@ set(LUGARU_SRCS
     ${SRCDIR}/Environment/Lights.cpp
     ${SRCDIR}/Environment/Skybox.cpp
     ${SRCDIR}/Environment/Terrain.cpp
+    ${SRCDIR}/Graphic/Decal.cpp
     ${SRCDIR}/Graphic/Models.cpp
     ${SRCDIR}/Graphic/Sprite.cpp
     ${SRCDIR}/Graphic/Stereo.cpp
@@ -64,9 +65,9 @@ set(LUGARU_SRCS
     ${SRCDIR}/Level/Dialog.cpp
     ${SRCDIR}/Level/Hotspot.cpp
     ${SRCDIR}/Math/Frustum.cpp
-    ${SRCDIR}/Math/Quaternions.cpp
+    ${SRCDIR}/Math/XYZ.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
@@ -82,6 +83,7 @@ set(LUGARU_SRCS
     ${SRCDIR}/GameInitDispose.cpp
     ${SRCDIR}/GameTick.cpp
     ${SRCDIR}/Globals.cpp
+    ${SRCDIR}/Tutorial.cpp
 
 )
 
@@ -96,6 +98,7 @@ set(LUGARU_H
     ${SRCDIR}/Environment/Lights.hpp
     ${SRCDIR}/Environment/Skybox.hpp
     ${SRCDIR}/Environment/Terrain.hpp
+    ${SRCDIR}/Graphic/Decal.hpp
     ${SRCDIR}/Graphic/gamegl.hpp
     ${SRCDIR}/Graphic/Models.hpp
     ${SRCDIR}/Graphic/Sprite.hpp
@@ -106,11 +109,10 @@ set(LUGARU_H
     ${SRCDIR}/Level/Dialog.hpp
     ${SRCDIR}/Level/Hotspot.hpp
     ${SRCDIR}/Math/Frustum.hpp
-    ${SRCDIR}/Math/PhysicsMath.hpp
-    ${SRCDIR}/Math/Quaternions.hpp
+    ${SRCDIR}/Math/XYZ.hpp
     ${SRCDIR}/Math/Random.hpp
     ${SRCDIR}/Menu/Menu.hpp
-    ${SRCDIR}/Objects/Objects.hpp
+    ${SRCDIR}/Objects/Object.hpp
     ${SRCDIR}/Objects/Person.hpp
     ${SRCDIR}/Objects/Weapons.hpp
     ${SRCDIR}/Thirdparty/optionparser.h
@@ -122,6 +124,7 @@ set(LUGARU_H
     ${SRCDIR}/Utils/Input.hpp
     ${SRCDIR}/Utils/private.h
     ${SRCDIR}/Game.hpp
+    ${SRCDIR}/Tutorial.hpp
 
 )
 
@@ -173,9 +176,13 @@ else(WIN32)
     find_package(OpenAL REQUIRED)
 endif(WIN32)
 
-# Not all distros provide sdl2-config.cmake yet
-#find_package(sdl2 REQUIRED)
-pkg_check_modules(SDL2 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)
@@ -232,7 +239,7 @@ endif(LINUX)
 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