Initial commit
This commit is contained in:
60
CMakeLists.txt
Normal file
60
CMakeLists.txt
Normal file
@ -0,0 +1,60 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project("FT22 Steering Wheel Display")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# DEPENDENCIES {{{
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2TTF REQUIRED)
|
||||
find_package(SDL2IMAGE REQUIRED)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
# fmtlib
|
||||
set(stw_display_orig_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
FetchContent_Declare(
|
||||
fmt
|
||||
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||
GIT_TAG 8.1.1
|
||||
)
|
||||
if (NOT fmt_POPULATED)
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
endif()
|
||||
if (NOT DEFINED fmt_INCLUDE_DIR)
|
||||
set(fmt_INCLUDE_DIR ${fmt_SOURCE_DIR}/${FMT_INC_DIR})
|
||||
endif()
|
||||
set(BUILD_SHARED_LIBS ${lhotse_orig_BUILD_SHARED_LIBS})
|
||||
|
||||
# }}}
|
||||
|
||||
add_compile_options(-Wall -Wextra -Wimplicit-fallthrough)
|
||||
|
||||
add_executable(
|
||||
stw-display
|
||||
src/main.cpp
|
||||
src/App.cpp
|
||||
src/AMI.cpp
|
||||
src/widgets.cpp
|
||||
src/util.cpp
|
||||
)
|
||||
target_include_directories(
|
||||
stw-display PUBLIC
|
||||
"include"
|
||||
)
|
||||
target_include_directories(
|
||||
stw-display PRIVATE
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
${fmt_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(
|
||||
stw-display
|
||||
${SDL2_LIBRARIES}
|
||||
${SDL2TTF_LIBRARY}
|
||||
${SDL2IMAGE_LIBRARY}
|
||||
fmt)
|
||||
add_dependencies(stw-display fmt)
|
||||
Reference in New Issue
Block a user