forked from rcxpony/sparkle
cmake fix
This commit is contained in:
parent
8e506ecd22
commit
dbe872b1ff
@ -8,11 +8,27 @@ set(SOURCE sources/main.cpp)
|
||||
set(LIBS ${CMAKE_SOURCE_DIR}/libs/)
|
||||
set(INCLUDE ${CMAKE_SOURCE_DIR}/include/)
|
||||
set(TESTS ${CMAKE_SOURCE_DIR}/tests)
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
set(CMAKE_CXX_COMPILER "clang++")
|
||||
|
||||
find_program(CMAKE_C_COMPILER clang)
|
||||
find_program(CLANG_CXX_COMPILER clang++)
|
||||
find_package(CURL REQUIRED)
|
||||
find_path(IXWEBSOCKET_INCLUDE_DIR ixwebsocket)
|
||||
find_library(IXWEBSOCKET_LIBRARIES ixwebsocket)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER OR NOT CLANG_CXX_COMPILER)
|
||||
message(STATUS "clang not found")
|
||||
set(CMAKE_C_COMPILER gcc)
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
find_program(CMAKE_C_COMPILER gcc)
|
||||
find_program(CLANG_CXX_COMPILER g++)
|
||||
if(NOT CMAKE_C_COMPILER OR NOT CLANG_CXX_COMPILER)
|
||||
message(FATAL_ERROR "gcc not found")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "current compiler: ${CMAKE_C_COMPILER}")
|
||||
|
||||
if(NOT IXWEBSOCKET_INCLUDE_DIR OR NOT IXWEBSOCKET_LIBRARIES)
|
||||
message(FATAL_ERROR "ixwebsocket not found")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user