From 7ebc1bb69e194276a004b31eda6d58758fea50d5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 10 Jul 2013 10:46:07 -0700 Subject: 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. --- CMakeLists.txt | 9 ++++----- 1 file 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) -- cgit v1.2.3