cmake_minimum_required(VERSION 3.16) project(bookmouse VERSION 1.0.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CXX_CPPCHECK "project=build/compile_commands.json;enable=information;force") set(CMAKE_EXPORT_COMPILE_COMMANDS true) add_library(stb_image SHARED src/stb_image.cpp) add_executable(bookmouse src/main.cpp src/archive.cpp src/image.cpp src/fud_mem.cpp src/sdl_context.cpp src/sdl_main_window.cpp src/imgui_context.cpp src/gl_context.cpp src/bookmouse.cpp src/file_dialog.cpp src/bookmouse_time.cpp ) include(warnings.cmake) find_package(spdlog REQUIRED) find_package(Fud REQUIRED) find_package(SDL2 REQUIRED) find_package(SDL2_image REQUIRED) find_package(SDL2_ttf REQUIRED) include(FindPkgConfig) PKG_SEARCH_MODULE(SDL2_gfx REQUIRED SDL2_gfx) find_package(OpenGL REQUIRED) target_include_directories(bookmouse PRIVATE ${FUD_INCLUDE_DIR} ${spdlog_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS} ) target_link_libraries(bookmouse PRIVATE zip spdlog::spdlog fud stb_image imgui ${SDL2_LIBRARIES} SDL2_image::SDL2_image SDL2_ttf::SDL2_ttf SDL2_gfx OpenGL ) target_compile_options(bookmouse PRIVATE ${BOOKMOUSE_WARNINGS})