21 lines
815 B
CMake
21 lines
815 B
CMake
cmake_minimum_required (VERSION 3.8)
|
|
project ("globalRPC")
|
|
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"
|
|
)
|
|
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}) |