Debian Codegraph @

src/cdogs/SDL_JoystickButtonNames/CMakeLists.txt

raw
1 include_directories(${SDL2_INCLUDE_DIRS})
2
3 file(READ gamecontrollerbuttondb.txt DB)
4 # Escape the newlines so it appears as multi line string in C
5 string(REPLACE "\n" "\\n\\\n" DB ${DB})
6 configure_file(
7 ${CMAKE_CURRENT_SOURCE_DIR}/db.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/db.h)
8 set_source_files_properties(
9 ${CMAKE_CURRENT_SOURCE_DIR}/db.h PROPERTIES GENERATED TRUE)
10
11 add_library(SDL_joystickbuttonnames STATIC
12 SDL_joystickbuttonnames.c SDL_joystickbuttonnames.h)
13 target_link_libraries(SDL_joystickbuttonnames SDL2::SDL2)