2020-05-13 17:07:04 +00:00
|
|
|
# This is the CMakeLists.txt file of the "hello world" project
|
|
|
|
# in order to show a simple executable that uses the ReactPhysics3D library
|
|
|
|
|
|
|
|
# Minimum cmake version required
|
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
|
2020-05-17 21:14:05 +00:00
|
|
|
# Help CMake to find the installed library on Windows
|
|
|
|
if(WIN32)
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "C:\\Program Files (x86)\\ReactPhysics3D")
|
2020-05-24 14:16:10 +00:00
|
|
|
elseif(APPLE)
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH "/usr/local/lib/cmake/ReactPhysics3D")
|
2020-05-17 21:14:05 +00:00
|
|
|
endif()
|
|
|
|
|
2020-05-13 17:07:04 +00:00
|
|
|
# Import the ReactPhysics3D library that you have installed on your computer using
|
|
|
|
# the "make install" command
|
|
|
|
find_package(ReactPhysics3D REQUIRED)
|
|
|
|
|
|
|
|
# Project
|
|
|
|
project(HelloWorld)
|
|
|
|
|
|
|
|
# Create the executable
|
|
|
|
add_executable(helloworld Main.cpp)
|
|
|
|
|
|
|
|
# Link with the ReactPhysics3D library
|
|
|
|
target_link_libraries(helloworld ReactPhysics3D::ReactPhysics3D)
|