mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Changed: Updated CMake modules for 64bits and STLport
This commit is contained in:
parent
38ee15a656
commit
ca12c13e68
6 changed files with 101 additions and 66 deletions
|
@ -40,14 +40,6 @@ INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
|
|||
# Force out of source builds.
|
||||
CHECK_OUT_OF_SOURCE()
|
||||
|
||||
IF(WIN32)
|
||||
FIND_PACKAGE(External REQUIRED)
|
||||
|
||||
IF(NOT DEFINED ENV{QTDIR})
|
||||
SET(ENV{QTDIR} "c:/qt/4.5.0")
|
||||
ENDIF(NOT DEFINED ENV{QTDIR})
|
||||
ENDIF(WIN32)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
PROJECT(RyzomCore CXX C)
|
||||
SET(NL_VERSION_MAJOR 0)
|
||||
|
@ -60,6 +52,14 @@ SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
|
|||
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
IF(WIN32)
|
||||
FIND_PACKAGE(External REQUIRED)
|
||||
|
||||
IF(NOT DEFINED ENV{QTDIR})
|
||||
SET(ENV{QTDIR} "c:/qt/4.5.0")
|
||||
ENDIF(NOT DEFINED ENV{QTDIR})
|
||||
ENDIF(WIN32)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set default config options
|
||||
#
|
||||
|
|
|
@ -24,6 +24,10 @@ IF(EXTERNAL_PATH)
|
|||
SET(EXTERNAL_FOUND TRUE)
|
||||
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include")
|
||||
|
||||
IF(NOT CMAKE_SIZEOF_VOID_P)
|
||||
MESSAGE(FATAL_ERROR "Size of void* is not set, you should call PROJECT(...) before")
|
||||
ENDIF(NOT CMAKE_SIZEOF_VOID_P)
|
||||
|
||||
# Using 32 or 64 bits libraries
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64")
|
||||
|
@ -46,3 +50,5 @@ ELSE(EXTERNAL_FOUND)
|
|||
MESSAGE(STATUS "Warning: Unable to find external!")
|
||||
ENDIF(NOT EXTERNAL_FIND_QUIETLY)
|
||||
ENDIF(EXTERNAL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(EXTERNAL_INCLUDE_PATH EXTERNAL_LIBRARY_PATH)
|
||||
|
|
|
@ -91,7 +91,7 @@ FIND_WWW_LIBRARY(LIBWWWZIP_LIBRARY wwwzip)
|
|||
FIND_WWW_LIBRARY(LIBMD5_LIBRARY md5)
|
||||
|
||||
# Windows libwww version needs GNU Regex
|
||||
IF(WIN32)
|
||||
IF(WIN32 AND WITH_STATIC)
|
||||
FIND_PATH(LIBWWW_REGEX_INCLUDE_DIR
|
||||
regex.h
|
||||
PATHS
|
||||
|
@ -108,19 +108,26 @@ IF(WIN32)
|
|||
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${LIBWWW_REGEX_INCLUDE_DIR})
|
||||
FIND_WWW_LIBRARY(LIBREGEX_LIBRARY gnu_regex)
|
||||
ENDIF(LIBWWW_REGEX_INCLUDE_DIR)
|
||||
ELSE(WIN32)
|
||||
FIND_PACKAGE(EXPAT)
|
||||
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${EXPAT_INCLUDE_DIRS})
|
||||
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${EXPAT_LIBRARIES})
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WIN32 AND WITH_STATIC)
|
||||
|
||||
IF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
||||
SET(LIBWWW_FOUND "YES")
|
||||
IF(NOT LIBWWW_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found LibWWW: ${LIBWWW_LIBRARIES}")
|
||||
ENDIF(NOT LIBWWW_FIND_QUIETLY)
|
||||
ELSE(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
||||
IF(NOT LIBWWW_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find LibWWW!")
|
||||
ENDIF(NOT LIBWWW_FIND_QUIETLY)
|
||||
ENDIF(LIBWWW_LIBRARIES AND LIBWWW_INCLUDE_DIR)
|
||||
IF(WITH_STATIC)
|
||||
# If compiled with expat support
|
||||
FIND_PACKAGE(EXPAT QUIET)
|
||||
IF(EXPAT_FOUND)
|
||||
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${EXPAT_INCLUDE_DIRS})
|
||||
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${EXPAT_LIBRARIES})
|
||||
ENDIF(EXPAT_FOUND)
|
||||
|
||||
# If compiled with OpenSSL support
|
||||
FIND_PACKAGE(OpenSSL QUIET)
|
||||
IF(OPENSSL_FOUND)
|
||||
SET(LIBWWW_INCLUDE_DIR ${LIBWWW_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR})
|
||||
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${OPENSSL_LIBRARIES})
|
||||
ENDIF(OPENSSL_FOUND)
|
||||
ENDIF(WITH_STATIC)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibWWW DEFAULT_MSG
|
||||
LIBWWW_LIBRARIES
|
||||
LIBWWW_INCLUDE_DIR
|
||||
)
|
||||
|
|
|
@ -4,17 +4,13 @@
|
|||
# LUABIND_FOUND, if false, do not try to link to LUABIND
|
||||
# LUABIND_INCLUDE_DIR, where to find headers.
|
||||
|
||||
|
||||
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(LUABIND_FIND_QUIETLY TRUE)
|
||||
ENDIF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
||||
|
||||
|
||||
|
||||
|
||||
FIND_PATH(LUABIND_INCLUDE_DIR
|
||||
luabind.hpp
|
||||
luabind/luabind.hpp
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/include
|
||||
/usr/local/include
|
||||
|
@ -23,45 +19,75 @@ FIND_PATH(LUABIND_INCLUDE_DIR
|
|||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES luabind
|
||||
)
|
||||
|
||||
IF(WITH_STLPORT)
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_RELEASE
|
||||
NAMES libluabind_stlport luabind libluabind
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_RELEASE
|
||||
NAMES luabind libluabind
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
||||
NAMES libluabind_stlportd luabind_d libluabind_d libluabindd
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
ELSE(WITH_STLPORT)
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_RELEASE
|
||||
NAMES luabind libluabind
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
||||
NAMES luabind_d libluabind_d libluabindd
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
||||
NAMES luabind_d libluabind_d libluabindd
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
ENDIF(WITH_STLPORT)
|
||||
|
||||
IF(LUABIND_INCLUDE_DIR)
|
||||
IF(LUABIND_LIBRARY_RELEASE)
|
||||
SET(LUABIND_FOUND "YES")
|
||||
SET(LUABIND_FOUND TRUE)
|
||||
|
||||
SET(LUABIND_LIBRARIES "optimized;${LUABIND_LIBRARY_RELEASE}")
|
||||
SET(LUABIND_LIBRARIES "optimized;${LUABIND_LIBRARY_RELEASE}")
|
||||
IF(LUABIND_LIBRARY_DEBUG)
|
||||
SET(LUABIND_LIBRARIES "${LUABIND_LIBRARIES};debug;${LUABIND_LIBRARY_DEBUG}")
|
||||
ENDIF(LUABIND_LIBRARY_DEBUG)
|
||||
|
|
|
@ -16,7 +16,7 @@ FIND_PATH(WINSDK_INCLUDE_DIR Windows.h
|
|||
)
|
||||
|
||||
IF(WINSDK_INCLUDE_DIR)
|
||||
SET(WINSDK_FOUND "YES")
|
||||
SET(WINSDK_FOUND TRUE)
|
||||
IF(NOT WINSDK_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Windows SDK.")
|
||||
ENDIF(NOT WINSDK_FIND_QUIETLY)
|
||||
|
|
|
@ -7,7 +7,7 @@ ENDIF(WITH_STATIC_DRIVERS)
|
|||
# On Windows we need to find DirectInput for NLMISC.
|
||||
# This is how we get events.
|
||||
IF(WIN32)
|
||||
FIND_PACKAGE(DirectXSDK)
|
||||
FIND_PACKAGE(DirectXSDK REQUIRED)
|
||||
|
||||
# On Win32 we can also build the MAX plugins.
|
||||
IF(WITH_MAXPLUGIN)
|
||||
|
@ -51,10 +51,6 @@ IF(WITH_SOUND)
|
|||
ENDIF(WITH_DRIVER_FMOD)
|
||||
ENDIF(WITH_SOUND)
|
||||
|
||||
IF(WITH_MFC)
|
||||
FIND_PACKAGE(MFC)
|
||||
ENDIF(WITH_MFC)
|
||||
|
||||
IF(WITH_GTK)
|
||||
FIND_PACKAGE(GTK2)
|
||||
ENDIF(WITH_GTK)
|
||||
|
|
Loading…
Reference in a new issue