Files
hack-assembler/CMakeLists.txt
lejulien 51de990690 Switch to cmake and fetch nlohmann::json
This will be used to dynamically set a label table
2026-05-19 19:11:53 +02:00

27 lines
538 B
CMake

cmake_minimum_required(VERSION 3.18)
set(NAME "hack-assembly")
project(${NAME} CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(FetchContent)
# nlohmann::json
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
)
FetchContent_MakeAvailable(json)
set(SRC_CXX_FILES "./main.cpp")
add_executable(${NAME} ${SRC_CXX_FILES})
target_link_libraries(${NAME} PUBLIC nlohmann_json::nlohmann_json)