aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-10 19:14:45 +0200
committerSven Gothel <[email protected]>2014-06-10 19:14:45 +0200
commita71e2ed35cc57dfc9ca6d33c3a2b8a53b3659710 (patch)
tree0e56f33d3ee7b76bd402cbab0f1d0903793ee685
parentf95bf4457fbc31112fa82dacbc1b7e094b9fd1cf (diff)
CMake: Don't use CMAKE_TOOLCHAIN_FILE for non-crosscompilation, use OPENAL_CUSTOM_CONFIG to inject cmake commands
-rw-r--r--CMakeLists.txt3
-rw-r--r--cmake/customconfig.clang-default.cmake (renamed from cmake/toolchain.clang-default.cmake)6
-rw-r--r--cmake/customconfig.clang-x86_32.cmake (renamed from cmake/toolchain.clang-x86_32.cmake)4
-rw-r--r--cmake/customconfig.gcc-default.cmake (renamed from cmake/toolchain.gcc-default.cmake)0
-rw-r--r--cmake/customconfig.gcc-x86_32.cmake (renamed from cmake/toolchain.gcc-x86_32.cmake)0
5 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 217c3d7e..cfbe30c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,9 @@ SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
SET(EXPORT_DECL "")
SET(ALIGN_DECL "")
+IF(OPENAL_CUSTOM_CONFIG)
+ include(${OPENAL_CUSTOM_CONFIG})
+ENDIF()
CHECK_TYPE_SIZE("long" SIZEOF_LONG)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
diff --git a/cmake/toolchain.clang-default.cmake b/cmake/customconfig.clang-default.cmake
index f38bf341..9f0f1b7c 100644
--- a/cmake/toolchain.clang-default.cmake
+++ b/cmake/customconfig.clang-default.cmake
@@ -1,8 +1,10 @@
# For normal clang compilation
-# set(CMAKE_C_FLAGS "-include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
-# set(CMAKE_CXX_FLAGS "-include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+set(CMAKE_C_FLAGS "-include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+set(CMAKE_CXX_FLAGS "-include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+set(CMAKE_CXX_CMPILER "gcc")
+set(CMAKE_C_CMPILER "gcc")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c++ flags")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
diff --git a/cmake/toolchain.clang-x86_32.cmake b/cmake/customconfig.clang-x86_32.cmake
index cc76881a..fa3cf16e 100644
--- a/cmake/toolchain.clang-x86_32.cmake
+++ b/cmake/customconfig.clang-x86_32.cmake
@@ -4,8 +4,8 @@ set(CMAKE_SYSTEM_PROCESSOR "x86")
link_directories("/usr/lib32")
-# set(CMAKE_C_FLAGS "-m32 -include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
-# set(CMAKE_CXX_FLAGS "-m32 -include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+set(CMAKE_C_FLAGS "-m32 -include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
+set(CMAKE_CXX_FLAGS "-m32 -include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c++ flags")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
diff --git a/cmake/toolchain.gcc-default.cmake b/cmake/customconfig.gcc-default.cmake
index 43294ab0..43294ab0 100644
--- a/cmake/toolchain.gcc-default.cmake
+++ b/cmake/customconfig.gcc-default.cmake
diff --git a/cmake/toolchain.gcc-x86_32.cmake b/cmake/customconfig.gcc-x86_32.cmake
index 502378ab..502378ab 100644
--- a/cmake/toolchain.gcc-x86_32.cmake
+++ b/cmake/customconfig.gcc-x86_32.cmake