-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (55 loc) · 2.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Generic CMakeLists.txt for making a Simbody-using executable.
# This shows how to use the provided SimbodyConfig.cmake to locate a Simbody
# 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 2.8)
project(SimTKpf)
# List your source and header files here.
set(my_source_files
src/Fourbar/assemble_Fourbar.cpp
src/Fourbar/Grashof_condition.cpp
src/Fourbar/Gyroscope.cpp
src/Fourbar/Txt_write.cpp
src/SimTKpf/Measuring_Instrument.cpp
src/SimTKpf/Particle_Classes.cpp
src/SimTKpf/Particle_Filter.cpp
src/SimTKpf/PF_Options.cpp
src/SimTKpf/PF_utilities.cpp
src/SimTKpf/Simbody_Instrument.cpp
src/SimTKpf/Stopwatch.cpp
)
set(my_header_files
include/Fourbar.h
include/Fourbar/assemble_Fourbar.h
include/Fourbar/Grashof_condition.h
include/Fourbar/Gyroscope.h
include/Fourbar/Txt_write.h
include/SimTKpf.h
include/SimTKpf/Measuring_Instrument.h
include/SimTKpf/Particle_Classes.h
include/SimTKpf/Particle_Filter.h
include/SimTKpf/PF_utilities.h
include/SimTKpf/PF_Options.h
include/SimTKpf/Simbody_Instrument.h
include/SimTKpf/Stopwatch.h
)
# This depends on SimbodyConfig.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.
find_package(Simbody REQUIRED)
# This is only necessary if Simbody was built using CMake older than 3.0.2.
include_directories(${Simbody_INCLUDE_DIR})
# Ignore MSVC deprecated warnings:
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
add_library(SimTKpf ${my_source_files} ${my_header_files})
target_link_libraries(SimTKpf PUBLIC ${Simbody_LIBRARIES})
target_include_directories(SimTKpf PUBLIC "${CMAKE_SOURCE_DIR}/include")
add_executable(Fourbar src/Fourbar/Fourbar.cpp)
target_link_libraries(Fourbar SimTKpf)
add_executable(Fourbar_StdDevTest src/Fourbar/Fourbar_StdDevTest.cpp)
target_link_libraries(Fourbar_StdDevTest SimTKpf)
add_executable(Fourbar_PtNumberTest src/Fourbar/Fourbar_PtNumberTest.cpp)
target_link_libraries(Fourbar_PtNumberTest SimTKpf)