cmake fix

This commit is contained in:
fluttershy 2025-01-20 16:22:58 +05:00
parent 8e506ecd22
commit dbe872b1ff
2 changed files with 18 additions and 1 deletions

View File

@ -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()

View File

@ -24,4 +24,5 @@ cmake .. && make -j$(nproc)
- [ ] Full api support
- [ ] Fixes for known bugs
- [ ] Windows support
- [ ] Sharding
- [ ] Sharding
- [ ] Tests