# A minimal CppModel project: one C++ and one C simulation built against the CppModel package.
#   cmake -S . -B build -DCMAKE_PREFIX_PATH=<path to the unpacked CppModel package>
#   cmake --build build
#   ./build/cpp_simulation        (build\Debug\cpp_simulation.exe with Visual Studio)
# cppmodel_deploy_runtime() puts the shared library next to each executable, so the build folder
# runs as it is and can be copied elsewhere.
cmake_minimum_required(VERSION 3.21)
project(CppModelExample C CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(cppmodel 0.8 REQUIRED)

add_executable(cpp_simulation simulation.cpp)
target_link_libraries(cpp_simulation PRIVATE cppmodel::cppmodel)
cppmodel_deploy_runtime(cpp_simulation)

add_executable(c_simulation simulation.c)
target_link_libraries(c_simulation PRIVATE cppmodel::cppmodel)
cppmodel_deploy_runtime(c_simulation)
