Toggle menu
71
399
28
3.6K
Medusa: Coordinate Free Meshless Method implementation
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Including this library in your project: Difference between revisions

From Medusa: Coordinate Free Meshless Method implementation
Created page with "Integration with our library is very simple if you are using `cmake`. Your basic CMakeLists.txt file should look something like this: project(your_project_name) cmake_minimum..."
 
No edit summary
Line 1: Line 1:
Integration with our library is very simple if you are using `cmake`.
Integration with our library is very simple if you are using <code>cmake</code>.
Your basic CMakeLists.txt file should look something like this:
Your basic <code>CMakeLists.txt</code> file should look something like this:


<syntaxhighlight>
project(your_project_name)
project(your_project_name)
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.12)
Line 16: Line 17:
add_executable(my_name my_name.cpp)
add_executable(my_name my_name.cpp)
target_link_libraries(my_name pde_utils)  # link to our library
target_link_libraries(my_name pde_utils)  # link to our library
</syntaxhighlight>

Revision as of 08:43, 13 December 2017

Integration with our library is very simple if you are using cmake. Your basic CMakeLists.txt file should look something like this:

project(your_project_name)
cmake_minimum_required(VERSION 2.8.12)

# add our library as a subfolder
add_subdirectory(${CMAKE_SOURCE_DIR}/path/to/our/root/folder/ build_util)

# include our source directory
include_directories(${CMAKE_SOURCE_DIR}/path/to/our/root/folder/src/)
# if you wish to use the same third_party libraries as we do, add the to your includes
include_directories(SYSTEM PUBLIC ${CMAKE_SOURCE_DIR}/path/to/our/root/folder/src/third_party/)

# define your own executables below
add_executable(my_name my_name.cpp)
target_link_libraries(my_name pde_utils)  # link to our library