Prepared CMake build for cross platform build

This commit is contained in:
EinTim23 2024-11-01 16:55:27 +01:00
parent a95b1736dd
commit 41b60064ad
1 changed files with 5 additions and 1 deletions

View File

@ -4,5 +4,9 @@ file(GLOB_RECURSE SOURCES "src/*.cpp")
add_executable (rpc ${SOURCES}) add_executable (rpc ${SOURCES})
set_property(TARGET rpc PROPERTY CXX_STANDARD 20) set_property(TARGET rpc PROPERTY CXX_STANDARD 20)
add_subdirectory("vendor") add_subdirectory("vendor")
target_link_libraries(rpc PUBLIC WindowsApp discord-rpc libcurl_static mbedcrypto mbedx509 mbedtls) set(LIBRARIES discord-rpc libcurl_static mbedcrypto mbedx509 mbedtls)
if(WIN32)
list(APPEND LIBRARIES WindowsApp)
endif()
target_link_libraries(rpc PUBLIC ${LIBRARIES})
target_include_directories(rpc PRIVATE vendor) target_include_directories(rpc PRIVATE vendor)