summaryrefslogtreecommitdiff
path: root/3rdparty/CMakeLists.txt
diff options
context:
space:
mode:
authorTrojal <trojal@gmail.com>2013-01-10 20:09:39 -0800
committerTrojal <trojal@gmail.com>2013-01-10 20:32:02 -0800
commit83e7a4954437c13aec639b0b512252cc20a8f36c (patch)
treeb7f6d11b2058248d026f2d9944e8f4b6ac288d50 /3rdparty/CMakeLists.txt
parent51bfeb38eb139e97e0e1c096c85c15fba234f35b (diff)
parent38e583df21eccd9e4f31d38acaae32579c6f0d27 (diff)
downloadhercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.gz
hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.bz2
hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.xz
hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.zip
Merge rathena repository to form Hercules initial commit.
Diffstat (limited to '3rdparty/CMakeLists.txt')
-rw-r--r--3rdparty/CMakeLists.txt55
1 files changed, 55 insertions, 0 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
new file mode 100644
index 000000000..3b60b68dc
--- /dev/null
+++ b/3rdparty/CMakeLists.txt
@@ -0,0 +1,55 @@
+
+# macro to configure the use of local or system version of a package
+# Uses:
+# HAVE_LOCAL_${name} - is local version available?
+# ${name}_LOCAL_LIBRARIES - libraries of the local version
+# ${name}_LOCAL_INCLUDE_DIRS - include directories of the local version
+# HAVE_SYSTEM_${name} - is system version available?
+# ${name}_SYSTEM_LIBRARIES - libraries of the system version
+# ${name}_SYSTEM_INCLUDE_DIRS - include directories of the system version
+# Generates:
+# WITH_LOCAL_${name} - use the local version of the package (only when local is available)
+# WITH_${name} - use this package
+# ${name}_LIBRARIES - libraries
+# ${name}_INCLUDE_DIRS - include directories
+macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name )
+ unset( ${name}_LIBRARIES CACHE )
+ unset( ${name}_INCLUDE_DIRS CACHE )
+ if( HAVE_LOCAL_${name} )
+ set( WITH_LOCAL_${name} ON
+ CACHE BOOL "use local version of ${name}" )
+ else()
+ unset( WITH_LOCAL_${name} CACHE )
+ endif()
+ if( WITH_LOCAL_${name} )
+ message( STATUS "Configuring for local ${name}" )
+ set( ${name}_LIBRARIES ${${name}_LOCAL_LIBRARIES} )
+ set( ${name}_INCLUDE_DIRS ${${name}_LOCAL_INCLUDE_DIRS} )
+ message( STATUS "Configuring for local ${name} - done" )
+ elseif( HAVE_SYSTEM_${name} )
+ message( STATUS "Configuring for system ${name}" )
+ set( ${name}_LIBRARIES ${${name}_SYSTEM_LIBRARIES} )
+ set( ${name}_INCLUDE_DIRS ${${name}_SYSTEM_INCLUDE_DIRS} )
+ message( STATUS "Configuring for system ${name} - done" )
+ endif()
+ if( WITH_LOCAL_${name} OR HAVE_SYSTEM_${name} )
+ set( WITH_${name} ON
+ CACHE BOOL "use ${name}" )
+ else()
+ unset( WITH_${name} CACHE )
+ endif()
+ set( ${name}_LIBRARIES ${${name}_LIBRARIES}
+ CACHE PATH "${name} libraries" )
+ set( ${name}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS}
+ CACHE PATH "${name} include directories" )
+ mark_as_advanced( ${name}_LIBRARIES )
+ mark_as_advanced( ${name}_INCLUDE_DIRS )
+endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM )
+
+
+add_subdirectory( libconfig )
+add_subdirectory( msinttypes )
+add_subdirectory( mt19937ar )
+add_subdirectory( mysql )
+add_subdirectory( pcre )
+add_subdirectory( zlib )