summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-07 03:21:42 +0000
committerflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-07 03:21:42 +0000
commit76d7c8ad887ac7b9dfdb495fe26ef8d4d8dfe370 (patch)
tree053d4d29a26693e1714f3e44383b8c2b1ac7199f /src/common
parent482beafefb9c50e5c1d3d16fd69b88cf2c9e84db (diff)
downloadhercules-76d7c8ad887ac7b9dfdb495fe26ef8d4d8dfe370.tar.gz
hercules-76d7c8ad887ac7b9dfdb495fe26ef8d4d8dfe370.tar.bz2
hercules-76d7c8ad887ac7b9dfdb495fe26ef8d4d8dfe370.tar.xz
hercules-76d7c8ad887ac7b9dfdb495fe26ef8d4d8dfe370.zip
* CMake: normalized variable names, added ability to create a package/installer.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14890 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 0241dfbca..21feb53f9 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,22 +1,8 @@
-#####################################################################
-# Find svnversion
-#
-message( STATUS "Detecting svnversion" )
-find_program( SVNVERSION_EXECUTABLE svnversion )
-mark_as_advanced( SVNVERSION_EXECUTABLE )
-message( STATUS "Detecting svnversion - done" )
-
-
#
# Create svnversion.h
#
message( STATUS "Creating svnversion.h" )
-if( SVNVERSION_EXECUTABLE )
- execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR}
- OUTPUT_VARIABLE SVNVERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE )
-endif()
if( SVNVERSION )
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
"#ifndef SVNVERSION\n#define SVNVERSION ${SVNVERSION}\n#endif\n" )
@@ -26,11 +12,14 @@ endif()
set( GLOBAL_INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "" )
set( SVNVERSION ${SVNVERSION}
CACHE STRING "SVN version of the source code" )
-if( INSTALL_BUILD_DATA )
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h DESTINATION ${CMAKE_INSTALL_PREFIX}/src/common )
+if( WITH_COMPONENT_DEVELOPMENT )
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
+ DESTINATION "src/common"
+ COMPONENT Development_base )
endif()
message( STATUS "Creating svnversion.h - done" )
+
#####################################################################
# setup
#
@@ -65,7 +54,7 @@ set( COMMON_MINI_DEFINITIONS MINICORE CACHE INTERNAL "" )
#
# common_base
#
-if( USE_ZLIB )
+if( WITH_ZLIB )
message( STATUS "Creating target common_base" )
set( COMMON_BASE_HEADERS
${COMMON_ALL_HEADERS}
@@ -126,7 +115,7 @@ endif()
#
# common_sql
#
-if( HAVE_common_base AND USE_MYSQL )
+if( HAVE_common_base AND WITH_MYSQL )
message( STATUS "Creating target common_sql" )
set( COMMON_SQL_HEADERS
${COMMON_ALL_HEADERS}