X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=CMakeLists.txt;h=ef94e17f7757eea7a9b8fcc3dc807b67a76fca5d;hb=91a44029744d973bf72d9dda7ffc13d6e9fb7130;hp=d1e62951cc47f74ad3398e9d2acdda68418b724f;hpb=e2829dbf48a6964e16eb6ba73d1354a37dc05506;p=lugaru.git diff --git a/CMakeLists.txt b/CMakeLists.txt index d1e6295..ef94e17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(lugaru) -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0004 OLD) include(FindPkgConfig) @@ -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 -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}") if(APPLE) set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX") @@ -66,7 +66,7 @@ set(LUGARU_SRCS ${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 @@ -82,6 +82,7 @@ set(LUGARU_SRCS ${SRCDIR}/GameInitDispose.cpp ${SRCDIR}/GameTick.cpp ${SRCDIR}/Globals.cpp + ${SRCDIR}/Tutorial.cpp ) @@ -110,7 +111,7 @@ set(LUGARU_H ${SRCDIR}/Math/Quaternions.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 +123,7 @@ set(LUGARU_H ${SRCDIR}/Utils/Input.hpp ${SRCDIR}/Utils/private.h ${SRCDIR}/Game.hpp + ${SRCDIR}/Tutorial.hpp ) @@ -173,7 +175,13 @@ else(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) @@ -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) - set(LUGARU_RESDIR ${LUGARU_APP_ROOT}/Resources) + set(LUGARU_RESDIR ${LUGARU_APP_ROOT}/Contents/Resources) endif(APPLE) # Actual installation instructions @@ -291,7 +299,10 @@ endif(APPLE) 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}/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})