mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-29 23:25:59 +00:00
Changed: Moved lua, luabind and curl FIND_PACKAGE in root CMakeLists.txt
This commit is contained in:
parent
d5baba13e8
commit
811dca71ee
3 changed files with 33 additions and 40 deletions
|
@ -106,7 +106,6 @@ IF(WIN32)
|
|||
ENDIF(WITH_MFC)
|
||||
ENDIF(WIN32)
|
||||
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
FIND_PACKAGE(LibXml2 REQUIRED)
|
||||
FIND_PACKAGE(PNG REQUIRED)
|
||||
FIND_PACKAGE(Jpeg)
|
||||
|
@ -114,6 +113,7 @@ FIND_PACKAGE(Jpeg)
|
|||
IF(WITH_STATIC_LIBXML2)
|
||||
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
||||
ENDIF(WITH_STATIC_LIBXML2)
|
||||
|
||||
IF(WITH_STATIC)
|
||||
# libxml2 could need winsock2 library
|
||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
||||
|
@ -144,6 +144,36 @@ IF(WITH_NEL)
|
|||
|
||||
IF(WITH_GUI)
|
||||
FIND_PACKAGE(Libwww REQUIRED)
|
||||
IF(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua51 REQUIRED)
|
||||
ELSE(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua50 REQUIRED)
|
||||
ENDIF(WITH_LUA51)
|
||||
FIND_PACKAGE(Luabind REQUIRED)
|
||||
FIND_PACKAGE(CURL REQUIRED)
|
||||
|
||||
IF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a")
|
||||
SET(CURL_STATIC ON)
|
||||
ENDIF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a")
|
||||
|
||||
IF(CURL_STATIC)
|
||||
SET(CURL_DEFINITIONS -DCURL_STATICLIB)
|
||||
|
||||
FIND_PACKAGE(OpenSSL QUIET)
|
||||
|
||||
IF(OPENSSL_FOUND)
|
||||
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
|
||||
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
|
||||
ENDIF(OPENSSL_FOUND)
|
||||
|
||||
# CURL Macports version depends on libidn, libintl and libiconv too
|
||||
IF(APPLE)
|
||||
FIND_LIBRARY(IDN_LIBRARY idn)
|
||||
FIND_LIBRARY(INTL_LIBRARY intl)
|
||||
|
||||
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${IDN_LIBRARY} ${INTL_LIBRARY})
|
||||
ENDIF(APPLE)
|
||||
ENDIF(CURL_STATIC)
|
||||
ENDIF(WITH_GUI)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR})
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
FIND_PACKAGE( Libwww REQUIRED )
|
||||
FIND_PACKAGE( CURL REQUIRED )
|
||||
FIND_PACKAGE( Lua51 REQUIRED )
|
||||
FIND_PACKAGE( Luabind REQUIRED )
|
||||
|
||||
FILE(GLOB SRC *.cpp *.h)
|
||||
FILE(GLOB HEADERS ../../include/nel/gui/*.h)
|
||||
|
||||
|
@ -31,6 +26,8 @@ TARGET_LINK_LIBRARIES( nelgui
|
|||
${CURL_LIBRARIES}
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS} ${LUABIND_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelgui ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
|
|
@ -14,44 +14,10 @@ IF(WITH_RYZOM_CLIENT)
|
|||
MESSAGE( FATAL_ERROR "The client cannot be built without the NeL GUI Library (WITH_GUI)")
|
||||
ENDIF(NOT WITH_GUI)
|
||||
|
||||
IF(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua51 REQUIRED)
|
||||
ELSE(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua50 REQUIRED)
|
||||
ENDIF(WITH_LUA51)
|
||||
FIND_PACKAGE(Luabind REQUIRED)
|
||||
FIND_PACKAGE(CURL REQUIRED)
|
||||
|
||||
IF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a")
|
||||
SET(CURL_STATIC ON)
|
||||
ENDIF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a")
|
||||
|
||||
IF(CURL_STATIC)
|
||||
SET(CURL_DEFINITIONS -DCURL_STATICLIB)
|
||||
|
||||
FIND_PACKAGE(OpenSSL QUIET)
|
||||
|
||||
IF(OPENSSL_FOUND)
|
||||
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
|
||||
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
|
||||
ENDIF(OPENSSL_FOUND)
|
||||
|
||||
# CURL Macports version depends on libidn, libintl and libiconv too
|
||||
IF(APPLE)
|
||||
FIND_LIBRARY(IDN_LIBRARY idn)
|
||||
FIND_LIBRARY(INTL_LIBRARY intl)
|
||||
|
||||
SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${IDN_LIBRARY} ${INTL_LIBRARY})
|
||||
ENDIF(APPLE)
|
||||
ENDIF(CURL_STATIC)
|
||||
|
||||
ADD_SUBDIRECTORY(client)
|
||||
|
||||
ELSEIF(WITH_RYZOM_TOOLS)
|
||||
|
||||
# Need clientsheets lib for sheets packer tool
|
||||
ADD_SUBDIRECTORY(client)
|
||||
|
||||
ENDIF(WITH_RYZOM_CLIENT)
|
||||
|
||||
IF(WITH_RYZOM_TOOLS)
|
||||
|
|
Loading…
Reference in a new issue