set(QT_LICENSE "Open Source")
set(QT_PRODUCT "OpenSauce") # it's not a bug, it's a feature!
-# in case a it's being include by something other than Katie build system
+# in case it's being include by something other than Katie build system
if(NOT KATIE_PLATFORM)
set(KATIE_PLATFORM "auto")
endif()
# TODO: more platforms/architectures support
include_directories(${KATIE_MKSPECS_DIR})
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND KATIE_PLATFORM STREQUAL "auto")
- include_directories(${KATIE_MKSPECS_DIR}/linux)
- set(KATIE_PLATFORM "linux")
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND KATIE_PLATFORM STREQUAL "auto")
- include_directories(${KATIE_MKSPECS_DIR}/win32)
- set(KATIE_PLATFORM "win32")
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND KATIE_PLATFORM STREQUAL "auto")
- include_directories(${KATIE_MKSPECS_DIR}/mac)
- set(KATIE_PLATFORM "mac")
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND KATIE_PLATFORM STREQUAL "auto")
- include_directories(${KATIE_MKSPECS_DIR}/freebsd)
- set(KATIE_PLATFORM "freebsd")
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND KATIE_PLATFORM STREQUAL "auto")
- include_directories(${KATIE_MKSPECS_DIR}/openbsd)
- set(KATIE_PLATFORM "openbsd")
-elseif(KATIE_PLATFORM STREQUAL "auto")
- MESSAGE(FATAL_ERROR "Unknown platform '${CMAKE_SYSTEM_NAME}'")
+if(KATIE_PLATFORM STREQUAL "auto")
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ include_directories(${KATIE_MKSPECS_DIR}/linux)
+ set(KATIE_PLATFORM "linux")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ include_directories(${KATIE_MKSPECS_DIR}/win32)
+ set(KATIE_PLATFORM "win32")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ include_directories(${KATIE_MKSPECS_DIR}/mac)
+ set(KATIE_PLATFORM "mac")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ include_directories(${KATIE_MKSPECS_DIR}/freebsd)
+ set(KATIE_PLATFORM "freebsd")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+ include_directories(${KATIE_MKSPECS_DIR}/openbsd)
+ set(KATIE_PLATFORM "openbsd")
+ else()
+ message(FATAL_ERROR "Unknown platform '${CMAKE_SYSTEM_NAME}'")
+ endif()
endif()
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND KATIE_COMPILER STREQUAL "auto")
- set(KATIE_COMPILER "clang")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND KATIE_COMPILER STREQUAL "auto")
- set(KATIE_COMPILER "gcc")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" AND KATIE_COMPILER STREQUAL "auto")
- set(KATIE_COMPILER "icc")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" AND KATIE_COMPILER STREQUAL "auto")
- set(KATIE_COMPILER "msvc")
-elseif(KATIE_COMPILER STREQUAL "auto")
- MESSAGE(FATAL_ERROR "Unknown compiler '${CMAKE_CXX_COMPILER_ID}'")
+if(KATIE_COMPILER STREQUAL "auto")
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set(KATIE_COMPILER "clang")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ set(KATIE_COMPILER "gcc")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+ set(KATIE_COMPILER "icc")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+ set(KATIE_COMPILER "msvc")
+ else()
+ message(FATAL_ERROR "Unknown compiler '${CMAKE_CXX_COMPILER_ID}'")
+ endif()
endif()
if(CMAKE_SYSTEM_PROCESSOR)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR)
string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
endif()
-if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND KATIE_ARCHITECTURE STREQUAL "auto")
- set(KATIE_ARCHITECTURE "arm")
-elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips" AND KATIE_ARCHITECTURE STREQUAL "auto")
- set(KATIE_ARCHITECTURE "mips")
-elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)" AND KATIE_ARCHITECTURE STREQUAL "auto")
- set(KATIE_ARCHITECTURE "x86_64")
-elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)" AND KATIE_ARCHITECTURE STREQUAL "auto")
- set(KATIE_ARCHITECTURE "i386")
-elseif(KATIE_ARCHITECTURE STREQUAL "auto")
- MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
+if(KATIE_ARCHITECTURE STREQUAL "auto")
+ if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+ set(KATIE_ARCHITECTURE "arm")
+ elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
+ set(KATIE_ARCHITECTURE "mips")
+ elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|i[3-6]86)")
+ set(KATIE_ARCHITECTURE "i386")
+ elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)")
+ set(KATIE_ARCHITECTURE "x86_64")
+ elseif()
+ message(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
+ endif()
endif()
# XXX: Plan9 does not supporting dynamic libraries