From eb2ecfa22a619c2b88175657f81277e90b4a20b8 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 7 Jan 2012 15:37:52 +0100 Subject: [PATCH] Add support for the doom3-libs repo Single CMake variable "DOOM3LIBS" to point to the repo of binaries to make CMake find libraries from there. --- neo/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 8926630c..c9801bb4 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -70,6 +70,19 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo") endif() +# precompiled libraries from the doom3-libs repo +if (DOOM3LIBS) + if (CMAKE_CROSSCOMPILING) + set(CMAKE_FIND_ROOT_PATH ${DOOM3LIBS}) + else() + set(ENV{CMAKE_PREFIX_PATH} ${DOOM3LIBS}) + endif() + + # these are too stupid, give them a hint + set(ENV{OPENALDIR} ${DOOM3LIBS}) + set(ENV{SDLDIR} ${DOOM3LIBS}) +endif() + # libs find_package(JPEG REQUIRED) include_directories(${JPEG_INCLUDE_DIR})