Changed: Allow to use external under Linux and Mac OS X
This commit is contained in:
parent
75f979fec8
commit
f3b9c7349f
2 changed files with 18 additions and 12 deletions
|
@ -8,7 +8,7 @@
|
||||||
# EXTERNAL_FOUND - True if the external libraries are available
|
# EXTERNAL_FOUND - True if the external libraries are available
|
||||||
|
|
||||||
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/../external ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty ${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty ${EXTERNAL_PATH})
|
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/../external ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty ${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty ${EXTERNAL_PATH})
|
||||||
SET(EXTERNAL_TEMP_FILE "include/zlib.h")
|
SET(EXTERNAL_TEMP_FILE "include/wwwconf.h")
|
||||||
SET(EXTERNAL_NAME "external")
|
SET(EXTERNAL_NAME "external")
|
||||||
|
|
||||||
# If using STLport preprend external_stlport
|
# If using STLport preprend external_stlport
|
||||||
|
@ -36,18 +36,18 @@ IF(EXTERNAL_PATH)
|
||||||
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include")
|
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include")
|
||||||
|
|
||||||
# Using 32 or 64 bits binaries
|
# Using 32 or 64 bits binaries
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64 AND WIN32)
|
||||||
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64")
|
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64")
|
||||||
ELSE(TARGET_X64)
|
ELSE(TARGET_X64 AND WIN32)
|
||||||
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin")
|
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF(TARGET_X64 AND WIN32)
|
||||||
|
|
||||||
# Using 32 or 64 bits libraries
|
# Using 32 or 64 bits libraries
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64 AND WIN32)
|
||||||
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64")
|
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64")
|
||||||
ELSE(TARGET_X64)
|
ELSE(TARGET_X64 AND WIN32)
|
||||||
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib")
|
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib")
|
||||||
ENDIF(TARGET_X64)
|
ENDIF(TARGET_X64 AND WIN32)
|
||||||
|
|
||||||
SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}")
|
SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}")
|
||||||
# Stupid hack for FindOpenAL.cmake
|
# Stupid hack for FindOpenAL.cmake
|
||||||
|
|
|
@ -178,6 +178,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
OPTION(WITH_STATIC "With static libraries." OFF)
|
OPTION(WITH_STATIC "With static libraries." OFF)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
|
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
|
||||||
|
IF(WIN32)
|
||||||
|
OPTION(WITH_EXTERNAL "With provided external." ON )
|
||||||
|
ELSE(WIN32)
|
||||||
|
OPTION(WITH_EXTERNAL "With provided external." OFF)
|
||||||
|
ENDIF(WIN32)
|
||||||
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
|
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -518,9 +523,11 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
|
ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
|
|
||||||
MACRO(SETUP_EXTERNAL)
|
MACRO(SETUP_EXTERNAL)
|
||||||
IF(WIN32)
|
IF(WITH_EXTERNAL)
|
||||||
FIND_PACKAGE(External REQUIRED)
|
FIND_PACKAGE(External REQUIRED)
|
||||||
|
ENDIF(WITH_EXTERNAL)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
||||||
IF(MSVC10)
|
IF(MSVC10)
|
||||||
IF(NOT MSVC10_REDIST_DIR)
|
IF(NOT MSVC10_REDIST_DIR)
|
||||||
|
@ -567,5 +574,4 @@ MACRO(SETUP_EXTERNAL)
|
||||||
INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR})
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ENDIF(WITH_STLPORT)
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
ENDMACRO(SETUP_EXTERNAL)
|
ENDMACRO(SETUP_EXTERNAL)
|
||||||
|
|
Loading…
Reference in a new issue