Changed: Allow to use external under Linux and Mac OS X

hg/feature/gsoc2012-fabien
kervala 13 years ago
parent 16383043d5
commit 60ba938794

@ -8,7 +8,7 @@
# 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_FILE "include/zlib.h")
SET(EXTERNAL_TEMP_FILE "include/wwwconf.h")
SET(EXTERNAL_NAME "external")
# If using STLport preprend external_stlport
@ -36,18 +36,18 @@ IF(EXTERNAL_PATH)
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include")
# Using 32 or 64 bits binaries
IF(TARGET_X64)
IF(TARGET_X64 AND WIN32)
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64")
ELSE(TARGET_X64)
ELSE(TARGET_X64 AND WIN32)
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin")
ENDIF(TARGET_X64)
ENDIF(TARGET_X64 AND WIN32)
# Using 32 or 64 bits libraries
IF(TARGET_X64)
IF(TARGET_X64 AND WIN32)
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64")
ELSE(TARGET_X64)
ELSE(TARGET_X64 AND WIN32)
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}")
# Stupid hack for FindOpenAL.cmake

@ -178,6 +178,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_STATIC "With static libraries." OFF)
ENDIF(WIN32)
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)
###
@ -518,9 +523,11 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
MACRO(SETUP_EXTERNAL)
IF(WIN32)
IF(WITH_EXTERNAL)
FIND_PACKAGE(External REQUIRED)
ENDIF(WITH_EXTERNAL)
IF(WIN32)
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
IF(MSVC10)
IF(NOT MSVC10_REDIST_DIR)
@ -567,5 +574,4 @@ MACRO(SETUP_EXTERNAL)
INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR})
ENDIF(WIN32)
ENDIF(WITH_STLPORT)
ENDMACRO(SETUP_EXTERNAL)

Loading…
Cancel
Save