Inital commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
project(stk VERSION 0.1.0 LANGUAGES C)
|
||||
|
||||
# CMake configuration
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps")
|
||||
|
||||
# Platform flags
|
||||
include(Platform)
|
||||
include(Flags)
|
||||
|
||||
include(Coverage)
|
||||
|
||||
# STK library
|
||||
add_subdirectory(stk)
|
||||
|
||||
# Main executable
|
||||
add_executable(main src/main.c)
|
||||
target_include_directories(main PRIVATE .)
|
||||
target_compile_features(main PRIVATE c_std_23)
|
||||
target_link_libraries(main PRIVATE stkshid)
|
||||
|
||||
# HID discovery tool (debug only)
|
||||
if(WIN32)
|
||||
add_executable(hid_discover tools/hid_discover.c)
|
||||
target_compile_features(hid_discover PRIVATE c_std_23)
|
||||
target_link_libraries(hid_discover PRIVATE setupapi hid)
|
||||
endif()
|
||||
|
||||
# Testing
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
|
||||
# IDE configuration
|
||||
include(IDE)
|
||||
Reference in New Issue
Block a user