Including this library in your project: Difference between revisions
From Medusa: Coordinate Free Meshless Method implementation
More actions
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
<syntaxhighlight lang="cmake"> | <syntaxhighlight lang="cmake"> | ||
project( | project(test_project) | ||
cmake_minimum_required(VERSION 2.8.12) | |||
add_subdirectory(${CMAKE_SOURCE_DIR}/ | add_subdirectory(${CMAKE_SOURCE_DIR}/../medusa/ medusa) # add our library's CMakeLists.txt as a subfolder | ||
include_directories(${CMAKE_SOURCE_DIR}/ | include_directories(${CMAKE_SOURCE_DIR}/../medusa/include/) # include medusa headers directory | ||
# define your own executables below | # define your own executables below | ||
add_executable( | add_executable(test test.cpp) | ||
target_link_libraries( | target_link_libraries(test medusa) # link to our library | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:28, 1 June 2018
Integration with our library is very simple if you are using cmake.
Your basic CMakeLists.txt file should look something like this:
project(test_project)
cmake_minimum_required(VERSION 2.8.12)
add_subdirectory(${CMAKE_SOURCE_DIR}/../medusa/ medusa) # add our library's CMakeLists.txt as a subfolder
include_directories(${CMAKE_SOURCE_DIR}/../medusa/include/) # include medusa headers directory
# define your own executables below
add_executable(test test.cpp)
target_link_libraries(test medusa) # link to our library