Introduce a CMake variable to define the libdir on Windows

As suggested by Daniel, use the same hack as dhewm3: The user defines a
path prefix and CMake does the rest. So this is enough to build on
Windows: cmake -G Unix\ Makefiles -DYQUAKE2LIBS=C:/MinGW/32/LIBS ..
This commit is contained in:
Yamagi Burmeister 2015-08-19 21:52:47 +02:00
parent b89781d748
commit 94ef1999b4
1 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,14 @@ project (yquake2)
# Cmake module search path # Cmake module search path
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/stuff/cmake/modules ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/stuff/cmake/modules ${CMAKE_MODULE_PATH})
if (YQUAKE2LIBS)
set(ENV{CMAKE_PREFIX_PATH} ${YQUAKE2LIBS})
set(ENV{OPENALDIR} ${YQUAKE2LIBS})
set(ENV{SDLDIR} ${YQUAKE2LIBS})
set(ENV{SDL2DIR} ${YQUAKE2LIBS})
endif()
# Add extended path for FreeBSD and Homebrew on OS X # Add extended path for FreeBSD and Homebrew on OS X
list(APPEND CMAKE_PREFIX_PATH /usr/local) list(APPEND CMAKE_PREFIX_PATH /usr/local)