aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-07-10 10:46:07 -0700
committerChris Robinson <[email protected]>2013-07-10 10:46:07 -0700
commit7ebc1bb69e194276a004b31eda6d58758fea50d5 (patch)
tree18d3660cf2ab4803a899a43687e161e19f396f8b
parent52096234e117273fba4b258d789a58580c56ba88 (diff)
Use OpenAL_SOURCE_DIR for the CMake module path and declare the project earlier
The minimum CMake version required is also bumped to 2.6. Patch by Andrew West, allows OpenAL Soft to be properly built as a sub-project.
-rw-r--r--CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41d4cbd1..354a5ae2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,15 @@
# CMake build file list for OpenAL
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+PROJECT(OpenAL)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
CMAKE_POLICY(SET CMP0005 NEW)
ENDIF(COMMAND CMAKE_POLICY)
-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
+SET(CMAKE_MODULE_PATH "${OpenAL_SOURCE_DIR}/cmake")
INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists)
@@ -20,9 +22,6 @@ INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckTypeSize)
-PROJECT(OpenAL)
-
-
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)