dvd files
wget https://git.christianimmanuel.de/games/dvd/archive/dvd.tar.gzCMakeLists.txt raw
# Set the minimum required version of CMake
cmake_minimum_required(VERSION 3.10)
# Set the project name
project(dvd_database VERSION 1.0 LANGUAGES C)
# Specify the C standard
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
# Find the required libraries
find_package(CURL REQUIRED)
# Find JSON-C
find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONC REQUIRED json-c)
# Add the source files
set(SOURCE_FILES
main.c
download_unpack.c
upcitemdb.c
imdb_search.c
ratings.c
)
# Include directories for the header files
include_directories(
${CMAKE_SOURCE_DIR}
${CURL_INCLUDE_DIRS}
${JSONC_INCLUDE_DIRS}
)
# Create the executable
add_executable(dvd_database ${SOURCE_FILES})
# Link the required libraries
target_link_libraries(dvd_database PRIVATE CURL::libcurl ${JSONC_LIBRARIES} m)
target_link_libraries(dvd_database PRIVATE CURL::libcurl ${JSONC_LIBRARIES} ncurses m)
# Ensure the correct flags are set for JSON-C
target_compile_options(dvd_database PRIVATE ${JSONC_CFLAGS_OTHER})