Skip to content

Commit

Permalink
FIXUP of CMakeLists/RORSERVER_WITH_CURL
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp committed Dec 23, 2024
1 parent 442282d commit d775e42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find_package(jsoncpp REQUIRED)
find_package(SocketW REQUIRED)
find_package(CURL)
cmake_dependent_option(RORSERVER_WITH_ANGELSCRIPT "Adds scripting support" ON "TARGET Angelscript::angelscript" OFF)
cmake_dependent_option(RORSERVER_WITH_CURL "Adds curl request support via AngelScript" ON "TARGET Angelscript::angelscript CURL:libcurl" OFF)
cmake_dependent_option(RORSERVER_WITH_CURL "Adds CURL request support (needs AngelScript)" ON "TARGET CURL:libcurl" OFF)

# setup paths
SET(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
Expand Down
9 changes: 5 additions & 4 deletions source/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ if (RORSERVER_WITH_ANGELSCRIPT)
target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_ANGELSCRIPT)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/source/angelscript_add_on)
target_link_libraries(${PROJECT_NAME} PRIVATE Angelscript::angelscript angelscript_addons)
if (RORSERVER_WITH_CURL)
target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CURL)
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
endif ()
endif ()

if (RORSERVER_WITH_CURL)
target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CURL)
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
endif ()

target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads SocketW::SocketW jsoncpp_lib)
Expand Down

0 comments on commit d775e42

Please sign in to comment.