1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
beats-motor-client/CMakeLists.txt
2013-04-16 15:29:55 +02:00

52 lines
1.5 KiB
CMake

cmake_minimum_required(VERSION 2.8)
add_subdirectory("motor")
include(motor/cmake/set_system_include_flag.cmake)
include(motor/cmake/address_sanitizer.cmake)
include(motor/cmake/detect_compiler.cmake)
check_compiling_with_clang(COMPILING_WITH_CLANG)
check_compiling_with_gcc(COMPILING_WITH_GCC)
if(${COMPILING_WITH_CLANG})
if(APPLE)
include_directories(SYSTEM "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/")
endif()
endif()
if(MINGW)
include(motor/cmake/enable_gnu11.cmake)
else()
include(motor/cmake/enable_cpp11.cmake)
endif()
if(UNIX)
#Always compile with debugging symbols
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
else()
if(MSVC)
message(FATAL_ERROR "Were not supporting MSVC at this time")
elseif(MINGW)
#assume were runnig cross compilation
add_definitions("-DGLEW_STATIC" "-DAL_LIBTYPE_STATIC" "-DALURE_STATIC_LIBRARY" "-DBOOST_THREAD_USE_LIB")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
else()
message(FATAL_ERROR "Unsupported platform detected")
endif()
endif()
include(motor/cmake/warning_settings.cmake)
get_sane_warning_flags(warnings)
include(motor/cmake/join.cmake)
join("${warnings}" " " warnings)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}")
# websockets lib
set(WITHOUT_TESTAPPS ON CACHE INTERNAL "" FORCE)
add_subdirectory(${PROJECT_SOURCE_DIR}/contrib/libwebsockets/)
include_directories(SYSTEM "${PROJECT_SOURCE_DIR}/contrib/libwebsockets/")
add_subdirectory("src")