mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-12 14:57:20 +00:00
Build the Windows client against the MSVC ABI while retaining clang language support. Use vcpkg for ANGLE and libsamplerate, and build MsQuic with its bundled static OpenSSL.
69 lines
1.3 KiB
CMake
69 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(lg_common LANGUAGES C CXX)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
|
|
|
|
include_directories(
|
|
${PROJECT_SOURCE_DIR}/include
|
|
)
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
add_compile_definitions(_GNU_SOURCE)
|
|
endif()
|
|
|
|
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
add_compile_options(
|
|
"-Wno-unknown-warning-option"
|
|
)
|
|
endif()
|
|
|
|
function(_lg_common_add_protocol)
|
|
# Function scope preserves the parent BUILD_TESTING setting while disabling
|
|
# LGProtocol's standalone tests in the nested build.
|
|
set(BUILD_TESTING OFF)
|
|
add_subdirectory(
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../repos/LGProtocol"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/LGProtocol"
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
endfunction()
|
|
|
|
_lg_common_add_protocol()
|
|
|
|
add_subdirectory(src/platform)
|
|
|
|
set(COMMON_SOURCES
|
|
src/appstrings.c
|
|
src/stringutils.c
|
|
src/stringlist.c
|
|
src/option.c
|
|
src/framebuffer.c
|
|
src/KVMFR.c
|
|
src/countedbuffer.c
|
|
src/rects.c
|
|
src/runningavg.c
|
|
src/ringbuffer.c
|
|
src/vector.c
|
|
src/cpuinfo.c
|
|
src/debug.c
|
|
src/ll.c
|
|
)
|
|
|
|
add_library(lg_common STATIC ${COMMON_SOURCES})
|
|
target_link_libraries(lg_common
|
|
PUBLIC
|
|
lg_common_platform
|
|
LGProtocol::Network
|
|
)
|
|
|
|
if(ENABLE_BACKTRACE)
|
|
target_compile_definitions(lg_common PUBLIC -DENABLE_BACKTRACE)
|
|
endif()
|
|
|
|
target_include_directories(lg_common
|
|
INTERFACE
|
|
include
|
|
PRIVATE
|
|
src
|
|
)
|