aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-06-25 03:14:04 -0700
committerChris Robinson <[email protected]>2013-06-25 03:14:04 -0700
commit62dd5f33b22121604423e030d003ecccbf414181 (patch)
tree33dbccf11d9c64860b977299c503d427f222d421
parent77a2c8bcf07352a75a580f1445ba112dbea69731 (diff)
Better handle the INCLUDE_DIRECTORIES property
Older cmake verions (prior to 2.8.8) don't have a per-target INCLUDE_DIRECTORIES property, so the directories have to be added using the INCLUDE_DIRECTORIES command.
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10d278d7..138c6d1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,10 @@ ENDIF()
# Add definitions, compiler switches, etc.
-INCLUDE_DIRECTORIES("include" "${OpenAL_BINARY_DIR}")
+INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/include" "${OpenAL_BINARY_DIR}")
+IF(CMAKE_VERSION VERSION_LESS "2.8.8")
+ INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/OpenAL32/Include")
+ENDIF()
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
@@ -773,6 +776,9 @@ IF(ALSOFT_EXAMPLES)
FIND_PACKAGE(SDL)
IF(SDL_FOUND)
FIND_PACKAGE(SDL_sound)
+ IF(CMAKE_VERSION VERSION_LESS "2.8.8")
+ INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
+ ENDIF()
ENDIF()
ENDIF()