summaryrefslogtreecommitdiff
path: root/3rdparty/CMakeLists.txt
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-13 17:14:43 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-13 17:14:43 +0000
commit93dd8ad5d0d9e1888ff4b32afa1fb09dbdd80be9 (patch)
tree9995391f4ac6aad31a4271c2440148b404d30667 /3rdparty/CMakeLists.txt
parent7e930917355db2790835bcda2f6ae37e3ae3c05c (diff)
downloadhercules-93dd8ad5d0d9e1888ff4b32afa1fb09dbdd80be9.tar.gz
hercules-93dd8ad5d0d9e1888ff4b32afa1fb09dbdd80be9.tar.bz2
hercules-93dd8ad5d0d9e1888ff4b32afa1fb09dbdd80be9.tar.xz
hercules-93dd8ad5d0d9e1888ff4b32afa1fb09dbdd80be9.zip
- Full revert of r16105 and r16106.
* Merged changes up to eAthena 15094. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16110 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to '3rdparty/CMakeLists.txt')
-rw-r--r--3rdparty/CMakeLists.txt33
1 files changed, 11 insertions, 22 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 41916ec48..3b60b68dc 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -2,23 +2,19 @@
# macro to configure the use of local or system version of a package
# Uses:
# HAVE_LOCAL_${name} - is local version available?
-# ${name}_LOCAL_DEPENDENCIES - dependencies of the local version
# ${name}_LOCAL_LIBRARIES - libraries of the local version
# ${name}_LOCAL_INCLUDE_DIRS - include directories of the local version
-# ${name}_LOCAL_DEFINITIONS - definitions of the local version
# HAVE_SYSTEM_${name} - is system version available?
-# ${name}_SYSTEM_DEPENDENCIES - dependencies of the system version
# ${name}_SYSTEM_LIBRARIES - libraries of the system version
# ${name}_SYSTEM_INCLUDE_DIRS - include directories of the system version
-# ${name}_SYSTEM_DEFINITIONS - definitions 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}_DEPENDENCIES - dependencies
# ${name}_LIBRARIES - libraries
# ${name}_INCLUDE_DIRS - include directories
-# ${name}_DEFINITIONS - definitions
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}" )
@@ -26,9 +22,14 @@ macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name )
unset( WITH_LOCAL_${name} CACHE )
endif()
if( WITH_LOCAL_${name} )
- set( _type "LOCAL" )
+ 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} )
- set( _type "SYSTEM" )
+ 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} )
@@ -37,24 +38,12 @@ macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name )
else()
unset( WITH_${name} CACHE )
endif()
- message( STATUS "Configuring for ${_type} ${name}" )
- unset( ${name}_DEPENDENCIES CACHE )
- unset( ${name}_LIBRARIES CACHE )
- unset( ${name}_INCLUDE_DIRS CACHE )
- unset( ${name}_DEFINITIONS CACHE )
- set( ${name}_DEPENDENCIES ${${name}_${_type}_DEPENDENCIES}
- CACHE PATH "${name} dependencies" )
- set( ${name}_LIBRARIES ${${name}_${_type}_LIBRARIES}
+ set( ${name}_LIBRARIES ${${name}_LIBRARIES}
CACHE PATH "${name} libraries" )
- set( ${name}_INCLUDE_DIRS ${${name}_${_type}_INCLUDE_DIRS}
+ set( ${name}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS}
CACHE PATH "${name} include directories" )
- set( ${name}_DEFINITIONS ${${name}_${_type}_DEFINITIONS}
- CACHE PATH "${name} definitions" )
- mark_as_advanced( ${name}_DEPENDENCIES )
mark_as_advanced( ${name}_LIBRARIES )
mark_as_advanced( ${name}_INCLUDE_DIRS )
- mark_as_advanced( ${name}_DEFINITIONS )
- message( STATUS "Configuring for ${_type} ${name} - done" )
endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM )