]> git.jsancho.org Git - lugaru.git/blobdiff - CMakeLists.txt
Rename debug mode to dev tools
[lugaru.git] / CMakeLists.txt
index c1a3e6b5030f7255f214ef47c56e7b237e9c0188..087eafe333cacaa94e79cd6ab3390dd2943fd073 100644 (file)
@@ -6,10 +6,10 @@ cmake_policy(SET CMP0004 OLD)
 include(FindPkgConfig)
 include(GNUInstallDirs)
 
-set(SRCDIR "${CMAKE_CURRENT_SOURCE_DIR}/Source")
 
+### Helpers
 
-### Helper
+set(SRCDIR "${CMAKE_CURRENT_SOURCE_DIR}/Source")
 
 if(UNIX AND NOT APPLE)
     set(LINUX TRUE)
@@ -18,6 +18,11 @@ endif()
 
 ### CMake config
 
+if(NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE RelWithDebInfo)
+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}")
 
 if(APPLE)
@@ -45,8 +50,10 @@ set(LUGARU_SRCS
     ${SRCDIR}/Animation/Skeleton.cpp
     ${SRCDIR}/Frustum.cpp
     ${SRCDIR}/Account.cpp
+    ${SRCDIR}/Campaign.cpp
     ${SRCDIR}/ConsoleCmds.cpp
     ${SRCDIR}/Dialog.cpp
+    ${SRCDIR}/Hotspot.cpp
     ${SRCDIR}/Game.cpp
     ${SRCDIR}/GameDraw.cpp
     ${SRCDIR}/GameInitDispose.cpp
@@ -84,8 +91,10 @@ set(LUGARU_H
     ${SRCDIR}/Animation/Skeleton.h
     ${SRCDIR}/Frustum.h
     ${SRCDIR}/Account.h
+    ${SRCDIR}/Campaign.h
     ${SRCDIR}/ConsoleCmds.h
     ${SRCDIR}/Dialog.h
+    ${SRCDIR}/Hotspot.h
     ${SRCDIR}/Game.h
     ${SRCDIR}/Lights.h
     ${SRCDIR}/Menu.h
@@ -226,6 +235,7 @@ endif(APPLE)
 
 if(WIN32)
     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru.exe DESTINATION ${CMAKE_INSTALL_PREFIX})
+    install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX})
     if(MINGW)
         # Based off Mageia/Fedora MinGW toolchain, might not work on other distros or Windows
         set(LIBGCC_S libgcc_s_sjlj-1.dll)
@@ -261,7 +271,7 @@ if(LINUX)
         install(FILES ${CMAKE_SOURCE_DIR}/Dist/lugaru.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps)
         install(FILES ${CMAKE_SOURCE_DIR}/Dist/lugaru.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
     else(SYSTEM_INSTALL)
-        message(WARNING "You are installing Lugaru without having enabled the SYSTEM_INSTALL option. It will default to looking for the data in the 'Data' directory next to the binary.")
+        message("You are building Lugaru without having enabled the SYSTEM_INSTALL option. It will default to looking for the data in the 'Data' directory next to the binary.")
         install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX})
         install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX})
     endif(SYSTEM_INSTALL)
@@ -279,6 +289,6 @@ endif(APPLE)
 install(FILES ${CMAKE_SOURCE_DIR}/AUTHORS
               ${CMAKE_SOURCE_DIR}/CONTENT-LICENSE.txt
               ${CMAKE_SOURCE_DIR}/COPYING.txt
-              ${CMAKE_SOURCE_DIR}/DEBUG-OPTIONS.txt
+              ${CMAKE_SOURCE_DIR}/DEVTOOLS.txt
               ${CMAKE_SOURCE_DIR}/README.md
         DESTINATION ${LUGARU_DOCDIR})