fix curl compile cmake

This commit is contained in:
Wirlaburla 2023-10-06 13:21:11 -05:00
parent ce204d0f8f
commit d9959342d3
2 changed files with 2 additions and 4 deletions

View File

@ -1,10 +1,8 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
project(pengobot) project(pengobot)
add_definitions(-DCURL_STATICLIB)
SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED True) SET(CMAKE_CXX_STANDARD_REQUIRED True)
SET(CMAKE_CXX_FLAGS "-O3") SET(CMAKE_CXX_FLAGS "-O3")
find_package(CURL REQUIRED) find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIR})
add_subdirectory(src) add_subdirectory(src)
install(TARGETS pengobot RUNTIME DESTINATION bin) install(TARGETS pengobot RUNTIME DESTINATION bin)

View File

@ -1,4 +1,4 @@
add_executable(pengobot add_executable(pengobot
main.cpp main.cpp
) )
target_link_libraries(pengobot ${CURL_LIBRARIES} -static) target_link_libraries(pengobot curl -static-openssl -static-libgcc -static-libstdc++)