PlayerLink/CMakeLists.txt

26 lines
969 B
CMake

cmake_minimum_required (VERSION 3.8)
if(APPLE)
project ("globalRPC" LANGUAGES C CXX OBJCXX)
else()
project ("globalRPC" LANGUAGES C CXX)
endif()
file(GLOB_RECURSE SOURCES "src/*.cpp")
add_executable (rpc ${SOURCES})
set_property(TARGET rpc PROPERTY CXX_STANDARD 20)
add_subdirectory("vendor")
set(LIBRARIES discord-rpc libcurl_static mbedcrypto mbedx509 mbedtls wxmono)
if(WIN32)
list(APPEND LIBRARIES WindowsApp)
endif()
file(GLOB wx_setup_dir
"${CMAKE_BINARY_DIR}/vendor/wxWidgets/lib/*/mswu"
"${CMAKE_BINARY_DIR}/vendor/wxWidgets/lib/*/gtk3u"
"${CMAKE_BINARY_DIR}/vendor/wxWidgets/lib/wx/include/*"
)
if(wx_setup_dir)
message(STATUS "wxWidgets setup.h directory found: ${wx_setup_dir}")
target_include_directories(rpc PRIVATE vendor vendor/wxWidgets/include ${wx_setup_dir})
else()
message(FATAL_ERROR "wx/setup.h not found. Please check your wxWidgets build configuration.")
endif()
target_link_libraries(rpc PUBLIC ${LIBRARIES})