]> git.jsancho.org Git - lugaru.git/commitdiff
CMake: Default to RelWithDebInfo build type when not specified
authorRémi Verschelde <rverschelde@gmail.com>
Fri, 9 Dec 2016 22:03:13 +0000 (23:03 +0100)
committerRémi Verschelde <rverschelde@gmail.com>
Fri, 9 Dec 2016 22:03:13 +0000 (23:03 +0100)
Also cosmetic changes.

CMakeLists.txt

index e29f3a748d4b88c590bea7b6154955af6dd51e9e..837960aebc378b9370e087c380579bac3cd488ce 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)
@@ -264,7 +269,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)