CMake can now also generate cygwin makefiles

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10962 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-03-12 00:48:52 +00:00
parent 74da40989e
commit bdac17c748
2 changed files with 23 additions and 7 deletions
+8 -2
View File
@@ -16,12 +16,16 @@ set(IRRLICHT_DIR "" CACHE PATH "Path to Irrlicht")
# Set library directories depending on system
if(APPLE)
set(IRRLICHT_LIBRARY_DIR "/Library/Frameworks/IrrFramework.framework")
elseif(CYGWIN)
# CYGWIN must be checked before "Unix" since Cygwin is a Unix
set(IRRLICHT_LIBRARY_DIR "${PROJECT_SOURCE_DIR}/dependencies/lib")
elseif(UNIX)
set(IRRLICHT_LIBRARY_DIR "${IRRLICHT_DIR}/lib/Linux")
elseif(MSVC)
set(IRRLICHT_LIBRARY_DIR "${PROJECT_SOURCE_DIR}/dependencies/lib")
else()
set(IRRLICHT_LIBRARY_DIR "${IRRLICHT_DIR}/lib/Win32-gcc")
# mingw / cygwin
set(IRRLICHT_LIBRARY_DIR "${PROJECT_SOURCE_DIR}/dependencies/lib")
endif()
# Find include directory and library
@@ -32,7 +36,9 @@ find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
if(APPLE)
find_library(IRRLICHT_LIBRARY NAMES IrrFramework PATHS ${IRRLICHT_LIBRARY_DIR})
else()
find_library(IRRLICHT_LIBRARY NAMES Irrlicht PATHS ${IRRLICHT_LIBRARY_DIR} ${PROJECT_SOURCE_DIR})
message("IRRLICHT_LIBRARY_DIR = ${IRRLICHT_LIBRARY_DIR}")
find_library(IRRLICHT_LIBRARY REQUIRED NAMES Irrlicht libIrrlicht PATHS ${IRRLICHT_LIBRARY_DIR} ${PROJECT_SOURCE_DIR})
message("IRRLICHT_LIBRARY = ${IRRLICHT_LIBRARY}")
endif()
# Determine Irrlicht version