Files
hack-assembler/CMakeLists.txt
lejulien 4afdcd1660 Cleanup the project
* Add .cache to gitignore (for the nlohmann::json library)
* Fix the project name
* Update the readme
2026-06-03 10:17:03 +02:00

27 lines
539 B
CMake

cmake_minimum_required(VERSION 3.18)
set(NAME "hack-assembler")
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)