summaryrefslogtreecommitdiff
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-12 20:14:01 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-12 20:14:01 +0000
commit2a28e9c80e2386961db84f5ce932b1e33f43b7b3 (patch)
treef83f743fcc1296e8e52ae78adcd6b9899024e07b /src/common/CMakeLists.txt
parenta56813476c822a9cf7a543a9e419255b70680bf0 (diff)
downloadhercules-2a28e9c80e2386961db84f5ce932b1e33f43b7b3.tar.gz
hercules-2a28e9c80e2386961db84f5ce932b1e33f43b7b3.tar.bz2
hercules-2a28e9c80e2386961db84f5ce932b1e33f43b7b3.tar.xz
hercules-2a28e9c80e2386961db84f5ce932b1e33f43b7b3.zip
* Merged changes up to eAthena 15095.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16105 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r--src/common/CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index effd0b2ab..f37819188 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -101,6 +101,7 @@ set( COMMON_BASE_SOURCES
"${COMMON_SOURCE_DIR}/utils.c"
${LIBCONFIG_SOURCES} # needed by conf.c/showmsg.c
CACHE INTERNAL "common_base sources" )
+set( DEPENDENCIES ${ZLIB_DEPENDENCIES} )
set( COMMON_BASE_INCLUDE_DIRS
${LIBCONFIG_INCLUDE_DIRS}
CACHE INTERNAL "common_base include dirs" )
@@ -109,11 +110,14 @@ set( COMMON_BASE_DEFINITIONS
CACHE INTERNAL "common_base definitions" )
set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} )
set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" )
+set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS} ${ZLIB_DEFINITIONS}" )
set( SOURCE_FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} )
source_group( mt19937ar FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} )
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} )
add_library( common_base ${SOURCE_FILES} )
+if( DEPENDENCIES )
+ add_dependencies( common_base ${DEPENDENCIES} )
+endif()
target_link_libraries( common_base ${LIBRARIES} )
set_target_properties( common_base PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
include_directories( ${INCLUDE_DIRS} )
@@ -138,15 +142,17 @@ set( COMMON_SQL_HEADERS
set( COMMON_SQL_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/sql.c"
CACHE INTERNAL "common_sql sources" )
-set( DEPENDENCIES common_base )
-set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} )
+set( DEPENDENCIES common_base ${MYSQL_DEPENDENCIES} )
+set( LIBRARIES ${GLOBAL_LIBRARIES} common_base ${MYSQL_LIBRARIES} )
set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} )
-set( DEFINITIONS "${GLOBAL_DEFINITIONS}" )
+set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${MYSQL_DEFINITIONS}" )
set( SOURCE_FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} )
source_group( common FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} )
add_library( common_sql ${SOURCE_FILES} )
-add_dependencies( common_sql ${DEPENDENCIES} )
-target_link_libraries( common_sql ${LIBRARIES} ${DEPENDENCIES} )
+if( DEPENDENCIES )
+ add_dependencies( common_sql ${DEPENDENCIES} )
+endif()
+target_link_libraries( common_sql ${LIBRARIES} )
set_target_properties( common_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
include_directories( ${INCLUDE_DIRS} )
set( HAVE_common_sql ON CACHE INTERNAL "" )