Adjust CMake "searchmacros" bit so that they point to correct locations

--HG--
branch : trunk
This commit is contained in:
click
2010-06-16 03:43:09 +02:00
parent 1955d42ae4
commit 5d7bed7222
5 changed files with 81 additions and 81 deletions
+7 -7
View File
@@ -3,7 +3,7 @@
# #
# This module defines # This module defines
# ACE_INCLUDE_DIRECTORIES, where to find ace.h # ACE_INCLUDE_DIR, where to find ace.h
# ACE_LIBRARIES, the libraries to link against # ACE_LIBRARIES, the libraries to link against
# ACE_FOUND, if false, you cannot build anything that requires ACE # ACE_FOUND, if false, you cannot build anything that requires ACE
@@ -13,7 +13,7 @@
set( ACE_FOUND 0 ) set( ACE_FOUND 0 )
if ( UNIX ) if ( UNIX )
FIND_PATH( ACE_INCLUDE_DIRECTORIES FIND_PATH( ACE_INCLUDE_DIR
NAMES NAMES
ace/ACE.h ace/ACE.h
PATHS PATHS
@@ -52,14 +52,14 @@ if ( UNIX )
# ) # )
if ( ACE_LIBRARY ) if ( ACE_LIBRARY )
if ( ACE_INCLUDE_DIRECTORIES ) if ( ACE_INCLUDE_DIR )
set( ACE_FOUND 1 ) set( ACE_FOUND 1 )
message( STATUS "Found ACE library: ${ACE_LIBRARY}") message( STATUS "Found ACE library: ${ACE_LIBRARY}")
message( STATUS "Found ACE headers: ${ACE_INCLUDE_DIRECTORIES}") message( STATUS "Found ACE headers: ${ACE_INCLUDE_DIR}")
else ( ACE_INCLUDE_DIRECTORIES ) else ( ACE_INCLUDE_DIR )
message(FATAL_ERROR "Could not find ACE headers! Please install ACE libraries and headers") message(FATAL_ERROR "Could not find ACE headers! Please install ACE libraries and headers")
endif ( ACE_INCLUDE_DIRECTORIES ) endif ( ACE_INCLUDE_DIR )
endif ( ACE_LIBRARY ) endif ( ACE_LIBRARY )
mark_as_advanced( ACE_FOUND ACE_LIBRARY ACE_EXTRA_LIBRARIES ACE_INCLUDE_DIRECTORIES ) mark_as_advanced( ACE_FOUND ACE_LIBRARY ACE_EXTRA_LIBRARIES ACE_INCLUDE_DIR )
endif (UNIX) endif (UNIX)
+7 -7
View File
@@ -3,7 +3,7 @@
# #
# This module defines # This module defines
# MYSQL_INCLUDE_DIRECTORY, where to find mysql.h # MYSQL_INCLUDE_DIR, where to find mysql.h
# MYSQL_LIBRARIES, the libraries to link against to connect to MySQL # MYSQL_LIBRARIES, the libraries to link against to connect to MySQL
# MYSQL_FOUND, if false, you cannot build anything that requires MySQL. # MYSQL_FOUND, if false, you cannot build anything that requires MySQL.
@@ -59,7 +59,7 @@ if( UNIX )
endif( MYSQL_CONFIG ) endif( MYSQL_CONFIG )
endif( UNIX ) endif( UNIX )
find_path(MYSQL_INCLUDE_DIRECTORIES find_path(MYSQL_INCLUDE_DIR
NAMES NAMES
mysql.h mysql.h
PATHS PATHS
@@ -122,13 +122,13 @@ else( NOT WIN32 )
endif( NOT WIN32 ) endif( NOT WIN32 )
if( MYSQL_LIBRARY ) if( MYSQL_LIBRARY )
if( MYSQL_INCLUDE_DIRECTORIES ) if( MYSQL_INCLUDE_DIR )
set( MYSQL_FOUND 1 ) set( MYSQL_FOUND 1 )
message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}") message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}")
message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIRECTORIES}") message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIR}")
else( MYSQL_INCLUDE_DIRECTORIES ) else( MYSQL_INCLUDE_DIR )
message(FATAL_ERROR "Could not find MySQL headers! Please install the development-libraries and headers.") message(FATAL_ERROR "Could not find MySQL headers! Please install the development-libraries and headers.")
endif( MYSQL_INCLUDE_DIRECTORIES ) endif( MYSQL_INCLUDE_DIR )
mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIRECTORY ) mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR )
endif( MYSQL_LIBRARY ) endif( MYSQL_LIBRARY )
+10 -10
View File
@@ -3,19 +3,19 @@
# #
# This module defines # This module defines
# OPENSSL_INCLUDE_DIRECTORIES, where to find openssl.h # OPENSSL_INCLUDE_DIR, where to find openssl.h
# OPENSSL_LIBRARIES, the libraries to link against to connect to MySQL # OPENSSL_LIBRARIES, the libraries to link against to connect to MySQL
# OPENSSL_FOUND, if false, you cannot build anything that requires MySQL. # OPENSSL_FOUND, if false, you cannot build anything that requires MySQL.
# also defined, but not for general use are # also defined, but not for general use are
# OPENSSL_LIBRARY, where to find the MySQL library. # OPENSSL_LIBRARY, where to find the MySQL library.
if( OPENSSL_INCLUDE_DIRECTORIES AND OPENSSL_LIBRARIES ) if( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES )
# in cache already # in cache already
set(OPENSSL_FOUND 1) set(OPENSSL_FOUND 1)
else( OPENSSL_INCLUDE_DIRECTORIES AND OPENSSL_LIBRARIES ) else( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES )
set(OPENSSL_FOUND 0) set(OPENSSL_FOUND 0)
find_path(OPENSSL_INCLUDE_DIRECTORIES find_path(OPENSSL_INCLUDE_DIR
NAMES NAMES
ssl.h ssl.h
PATHS PATHS
@@ -64,15 +64,15 @@ else( OPENSSL_INCLUDE_DIRECTORIES AND OPENSSL_LIBRARIES )
endif( WIN32 ) endif( WIN32 )
if( OPENSSL_LIBRARIES ) if( OPENSSL_LIBRARIES )
if( OPENSSL_INCLUDE_DIRECTORIES ) if( OPENSSL_INCLUDE_DIR )
set( OPENSSL_FOUND 1 ) set( OPENSSL_FOUND 1 )
message(STATUS "Found OpenSSL library: ${OPENSSL_LIBRARIES}") message(STATUS "Found OpenSSL library: ${OPENSSL_LIBRARIES}")
message(STATUS "Found OpenSSL headers: ${OPENSSL_INCLUDE_DIRECTORIES}") message(STATUS "Found OpenSSL headers: ${OPENSSL_INCLUDE_DIR}")
else ( OPENSSL_INCLUDE_DIRECTORIES ) else ( OPENSSL_INCLUDE_DIR )
message(FATAL_ERROR "Could not find OpenSSL headers! Please install the development-headers") message(FATAL_ERROR "Could not find OpenSSL headers! Please install the development-headers")
endif( OPENSSL_INCLUDE_DIRECTORIES ) endif( OPENSSL_INCLUDE_DIR )
else( OPENSSL_LIBRARIES ) else( OPENSSL_LIBRARIES )
message(FATAL_ERROR "Could not find OpenSSL libraries! Please install the library before continuing") message(FATAL_ERROR "Could not find OpenSSL libraries! Please install the library before continuing")
endif( OPENSSL_LIBRARIES ) endif( OPENSSL_LIBRARIES )
mark_as_advanced( OPENSSL_FOUND OPENSSL_LIBRARIES OPENSSL_EXTRA_LIBRARIES OPENSSL_INCLUDE_DIRECTORIES ) mark_as_advanced( OPENSSL_FOUND OPENSSL_LIBRARIES OPENSSL_EXTRA_LIBRARIES OPENSSL_INCLUDE_DIR )
endif( OPENSSL_INCLUDE_DIRECTORIES AND OPENSSL_LIBRARIES ) endif( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES )
+22 -22
View File
@@ -11,20 +11,22 @@
########### authserver ############### ########### authserver ###############
SET(authserver_SRCS SET(authserver_SRCS
Authentication/AuthCodes.cpp Authentication/AuthCodes.cpp
Authentication/AuthCodes.h Authentication/AuthCodes.h
Realms/RealmList.cpp Realms/RealmList.cpp
Realms/RealmList.h Realms/RealmList.h
Server/AuthSocket.cpp Server/AuthSocket.cpp
Server/AuthSocket.h Server/AuthSocket.h
Server/RealmSocket.h Server/RealmSocket.h
Server/RealmSocket.cpp Server/RealmSocket.cpp
Server/RealmAcceptor.h Server/RealmAcceptor.h
Main.cpp Main.cpp
) )
include_directories( include_directories(
${ACE_INCLUDE_DIR} ${ACE_INCLUDE_DIR}
${MYSQL_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/server/shared ${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Database ${CMAKE_SOURCE_DIR}/src/server/shared/Database
@@ -37,38 +39,36 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/authserver/Authentication ${CMAKE_SOURCE_DIR}/src/server/authserver/Authentication
${CMAKE_SOURCE_DIR}/src/server/authserver/Realms ${CMAKE_SOURCE_DIR}/src/server/authserver/Realms
${CMAKE_SOURCE_DIR}/src/server/authserver/Server ${CMAKE_SOURCE_DIR}/src/server/authserver/Server
${MYSQL_INCLUDE_DIR}
) )
SET(authserver_LINK_FLAGS "") SET(authserver_LINK_FLAGS "")
add_executable(authserver ${authserver_SRCS}) add_executable(authserver ${authserver_SRCS})
add_definitions( add_definitions(
-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"' -D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"'
) )
SET(trinity-realm_LINK_FLAGS "-pthread ${authserver_LINK_FLAGS}") SET(trinity-realm_LINK_FLAGS "-pthread ${authserver_LINK_FLAGS}")
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin") IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
SET(authserver_LINK_FLAGS "-framework Carbon ${authserver_LINK_FLAGS}") SET(authserver_LINK_FLAGS "-framework Carbon ${authserver_LINK_FLAGS}")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin") ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
SET_TARGET_PROPERTIES(authserver PROPERTIES LINK_FLAGS "${authserver_LINK_FLAGS}") SET_TARGET_PROPERTIES(authserver PROPERTIES LINK_FLAGS "${authserver_LINK_FLAGS}")
target_link_libraries( target_link_libraries(
authserver authserver
shared shared
trinitydatabase trinitydatabase
trinityauth trinityauth
trinityconfig trinityconfig
${SSLLIB} ${MYSQL_LIBRARY}
${MYSQL_LIBRARIES} ${OPENSSL_LIBRARIES}
${OSX_LIBS} ${OSX_LIBS}
) )
install(TARGETS authserver DESTINATION bin) install(TARGETS authserver DESTINATION bin)
########### install files ############### ########### install files ###############
install(FILES authserver.conf.dist DESTINATION etc) install(FILES authserver.conf.dist DESTINATION etc)
+35 -35
View File
@@ -11,19 +11,21 @@
########### worldserver ############### ########### worldserver ###############
SET(worldserver_SRCS SET(worldserver_SRCS
CommandLine/CliRunnable.cpp CommandLine/CliRunnable.cpp
CommandLine/CliRunnable.h CommandLine/CliRunnable.h
RemoteAccess/RASocket.cpp RemoteAccess/RASocket.cpp
RemoteAccess/RASocket.h RemoteAccess/RASocket.h
WorldThread/WorldRunnable.cpp WorldThread/WorldRunnable.cpp
WorldThread/WorldRunnable.h WorldThread/WorldRunnable.h
Main.cpp Main.cpp
Master.cpp Master.cpp
Master.h Master.h
) )
include_directories( include_directories(
${ACE_INCLUDE_DIR} ${ACE_INCLUDE_DIR}
${MYSQL_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/externals/sockets/include ${CMAKE_SOURCE_DIR}/externals/sockets/include
${CMAKE_SOURCE_DIR}/externals/mersennetwister ${CMAKE_SOURCE_DIR}/externals/mersennetwister
@@ -115,56 +117,54 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/worldserver/CommandLine ${CMAKE_SOURCE_DIR}/src/server/worldserver/CommandLine
${CMAKE_SOURCE_DIR}/src/server/worldserver/RemoteAccess ${CMAKE_SOURCE_DIR}/src/server/worldserver/RemoteAccess
${CMAKE_SOURCE_DIR}/src/server/worldserver/WorldThread ${CMAKE_SOURCE_DIR}/src/server/worldserver/WorldThread
${MYSQL_INCLUDE_DIR}
) )
SET(worldserver_LINK_FLAGS "") SET(worldserver_LINK_FLAGS "")
add_executable(worldserver ${worldserver_SRCS}) add_executable(worldserver ${worldserver_SRCS})
add_definitions( add_definitions(
-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"' -D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"'
) )
SET(worldserver_LINK_FLAGS "-pthread ${worldserver_LINK_FLAGS}") SET(worldserver_LINK_FLAGS "-pthread ${worldserver_LINK_FLAGS}")
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin") IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
SET(worldserver_LINK_FLAGS "-framework Carbon ${worldserver_LINK_FLAGS}") SET(worldserver_LINK_FLAGS "-framework Carbon ${worldserver_LINK_FLAGS}")
SET(SCRIPT_LIB "") SET(SCRIPT_LIB "")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin") ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
SET_TARGET_PROPERTIES(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}") SET_TARGET_PROPERTIES(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}")
if(DO_SCRIPTS) if(DO_SCRIPTS)
SET(SCRIPT_LIB "scripts") SET(SCRIPT_LIB "scripts")
else(DO_SCRIPTS) else(DO_SCRIPTS)
SET(SCRIPT_LIB "") SET(SCRIPT_LIB "")
endif(DO_SCRIPTS) endif(DO_SCRIPTS)
target_link_libraries( target_link_libraries(
worldserver worldserver
game game
shared shared
zlib zlib
trinitysockets trinitysockets
trinitydatabase trinitydatabase
trinityauth trinityauth
trinityconfig trinityconfig
collision collision
g3dlib g3dlib
jemalloc jemalloc
${SCRIPT_LIB} ${SCRIPT_LIB}
${READLINE_LIBRARY} ${READLINE_LIBRARY}
${TERMCAP_LIBRARY} ${TERMCAP_LIBRARY}
${MYSQL_LIBRARIES} ${ACE_LIBRARY}
${SSLLIB} ${MYSQL_LIBRARY}
${ACE_LIBRARY} ${OPENSSL_LIBRARIES}
${ZLIB} ${ZLIB}
${OSX_LIBS} ${OSX_LIBS}
) )
install(TARGETS worldserver DESTINATION bin) install(TARGETS worldserver DESTINATION bin)
########### install files ############### ########### install files ###############
install(FILES worldserver.conf.dist DESTINATION etc) install(FILES worldserver.conf.dist DESTINATION etc)