summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-09 07:39:27 +0000
committerflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-09 07:39:27 +0000
commitab9b60f5c4501eb8d7bec4a053d73fc723ea31b5 (patch)
treeceea0d69fbfe3366454c34157adc1baa414f291b /CMakeLists.txt
parent912dfc3af719b251d8a5036e76fb2733dddad46c (diff)
downloadhercules-ab9b60f5c4501eb8d7bec4a053d73fc723ea31b5.tar.gz
hercules-ab9b60f5c4501eb8d7bec4a053d73fc723ea31b5.tar.bz2
hercules-ab9b60f5c4501eb8d7bec4a053d73fc723ea31b5.tar.xz
hercules-ab9b60f5c4501eb8d7bec4a053d73fc723ea31b5.zip
* CMake: added search for math library, made CPack existence optional, updated the search for mysqlclient and corrected misspelled variables (tested with FreeBSD-8.2-i386)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14893 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt32
1 files changed, 28 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 953c804ff..523d445ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,9 @@ endif()
message( STATUS "Detecting svnversion" )
find_program( SVNVERSION_EXECUTABLE svnversion )
mark_as_advanced( SVNVERSION_EXECUTABLE )
+if( SVNVERSION_EXECUTABLE )
+ message( STATUS "Found svnversion: ${SVNVERSION_EXECUTABLE}" )
+endif()
message( STATUS "Detecting svnversion - done" )
@@ -59,6 +62,19 @@ message( STATUS "Detecting Subversion - done" )
#
+# Find math library (FreeBSD)
+#
+message( STATUS "Detecting math library" )
+find_library( M_LIBRARIES m )
+mark_as_advanced( M_LIBRARIES )
+if( M_LIBRARIES )
+ message( STATUS "Found m: ${M_LIBRARIES}" )
+ list( APPEND GLOBAL_LIBRARIES ${M_LIBRARIES} )
+endif()
+message( STATUS "Detecting math library - done" )
+
+
+#
# PACKETVER
#
set( PACKETVER CACHE STRING "Sets the PACKETVER define of the servers. (see src/common/mmo.h)" )
@@ -93,7 +109,15 @@ set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "MMORPG server package" )
set( CPACK_PACKAGE_VERSION ${SVNVERSION} )
set( CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE )
#set( CPACK_MONOLITHIC_INSTALL ON )
-include( CPACK )
+include( CPACK OPTIONAL RESULT_VARIABLE HAVE_CPACK )
+if( NOT HAVE_CPACK )
+ # empty replacements
+ macro( cpack_add_component_group )
+ endmacro()
+ macro( cpack_add_component )
+ endmacro()
+ message( STATUS "CPACK not found, package creation disabled" )
+endif()
set( Runtime "Runtime files" CACHE INTERNAL "" )
set( Runtime_base "configurations, dbs, npcs, docs, ..." CACHE INTERNAL "" )
@@ -111,10 +135,10 @@ cpack_add_component( Development_base DESCRIPTION ${Development_base} DISPLAY_NA
#
# install stuff
#
-option( WITH_COMPONENT_RUNTIME "install files needed to run the project" ON )
-option( WITH_COMPONENT_DEVELOPMENT "install files needed to build the project" OFF )
+option( WITH_COMPONENT_RUNTIME "install/package files needed to run the project" ON )
+option( WITH_COMPONENT_DEVELOPMENT "install/package files needed to build the project" OFF )
option( INSTALL_TO_PATH "copy files to INSTALL_PATH" OFF )
-option( INSTALL_TO_SOURCE "copy files to source directory (${CMAKE_CURRENT_SOURCE_DIR})" OFF )
+option( INSTALL_TO_SOURCE "copy files to source directory, skips what is already there (${CMAKE_CURRENT_SOURCE_DIR})" OFF )
option( INSTALL_TO_SUBDIR "copy files to subdirectory (${CMAKE_CURRENT_BINARY_DIR}/install)" OFF )
set( INSTALL_PATH "${CMAKE_INSTALL_PREFIX}" CACHE STRING "install path (only used when INSTALL_TO_PATH is set)" )
mark_as_advanced( CMAKE_INSTALL_PREFIX )