# Generic CMakeLists.txt for making an OpenSim-using executable.
# This shows how to use the provided OpenSimConfig.cmake to locate an OpenSim
# installation on your machine so you can use it from your own code.
# You will most likely want to copy some of these lines into your own
# CMakeLists.txt rather than use this one verbatim.

cmake_minimum_required(VERSION 3.2)
project(myexe)

# List your source and header files here.
set(my_source_files myexe.cpp)
set(my_header_files myexe.h)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# This depends on OpenSimConfig.cmake being located somewhere predictable
# on your machine. If you have installed it somewhere that CMake won't be
# able to guess, you'll need to tell find_package where to look (with the PATHS
# or HINTS parameters), or specify the installation directory in the
# CMAKE_PREFIX_PATH variable.
find_package(OpenSim REQUIRED)

add_executable(myexe ${my_source_files} ${my_header_files})
target_link_libraries(myexe ${OpenSim_LIBRARIES})
