From 9349df4e5fa122fd74d632d4227f8c1a1f32c36d Mon Sep 17 00:00:00 2001 From: flaviojs Date: Tue, 12 Jul 2011 06:39:46 +0000 Subject: * CMake: set project language to C, added module FindFunctionLibrary, added search for dl library. (tested with debian-wheezy-i386) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14902 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common') diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index a389a0b58..3fb95e5e0 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -48,7 +48,7 @@ set( COMMON_MINI_SOURCES "${COMMON_SOURCE_DIR}/showmsg.c" "${COMMON_SOURCE_DIR}/strlib.c" CACHE INTERNAL "" ) -set( COMMON_MINI_DEFINITIONS MINICORE CACHE INTERNAL "" ) +set( COMMON_MINI_DEFINITIONS "-DMINICORE" CACHE INTERNAL "" ) # @@ -95,13 +95,13 @@ set( COMMON_BASE_SOURCES CACHE INTERNAL "common_base sources" ) set( LIBRARIES ${ZLIB_LIBRARIES} ) set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ) -set( DEFINITIONS ${GLOBAL_DEFINITIONS} ) +set( DEFINITIONS "${GLOBAL_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} ) target_link_libraries( common_base ${LIBRARIES} ) -set_target_properties( common_base PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) +set_target_properties( common_base PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) include_directories( ${INCLUDE_DIRS} ) set( HAVE_common_base ON CACHE BOOL "common_base target is available" ) mark_as_advanced( HAVE_common_base ) @@ -128,13 +128,13 @@ set( COMMON_SQL_SOURCES set( DEPENDENCIES common_base ) set( LIBRARIES ${MYSQL_LIBRARIES} ) set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} ) -set( DEFINITIONS ${GLOBAL_DEFINITIONS} ) +set( DEFINITIONS "${GLOBAL_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} ) -set_target_properties( common_sql PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) +set_target_properties( common_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) include_directories( ${INCLUDE_DIRS} ) set( HAVE_common_sql ON CACHE BOOL "common_sql target is available" ) mark_as_advanced( HAVE_common_sql ) -- cgit v1.2.3-60-g2f50