Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: updated pkg name to graph instead of libgraph and use xmotion … #18

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10.2)
project(libgraph VERSION 2.0.1)
project(graph VERSION 2.0.1)

## Project Options
option(BUILD_TESTING "Build tests" OFF)
Expand Down Expand Up @@ -98,7 +98,7 @@ endforeach()

# targets to install
install(TARGETS graph
EXPORT libgraphTargets
EXPORT graphTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
Expand All @@ -110,19 +110,19 @@ install(DIRECTORY src/include/graph
# export target configuration
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
libgraphConfigVersion.cmake
graphConfigVersion.cmake
VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
COMPATIBILITY SameMajorVersion)

install(EXPORT libgraphTargets
FILE libgraphTargets.cmake
NAMESPACE rdu::
DESTINATION lib/cmake/libgraph)
install(EXPORT graphTargets
FILE graphTargets.cmake
NAMESPACE xmotion::
DESTINATION lib/cmake/graph)

configure_file(cmake/libgraphConfig.cmake.in libgraphConfig.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libgraphConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/libgraphConfigVersion.cmake"
DESTINATION lib/cmake/libgraph)
configure_file(cmake/graphConfig.cmake.in graphConfig.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/graphConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/graphConfigVersion.cmake"
DESTINATION lib/cmake/graph)

# Packaging support
set(CPACK_PACKAGE_VENDOR "Ruixiang Du")
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This is a header-only library. There are multiple ways you can integrate this li

1. Simply copy content of the "src" folder to your project and include "graph/graph.hpp".
2. If you're using CMake, you could integrate the library to your project by adding this repository as a git submodule. Then use "add_subdirectory()" in your CMakeLists.txt to add the library to your build tree.
3. You can build and install this library to your system path and use CMake "find_package(graph REQUIRED)" to find the library and add dependency by using "target_link_libraries(your_app PRIVATE rdu::graph)".
3. You can build and install this library to your system path and use CMake "find_package(graph REQUIRED)" to find the library and add dependency by using "target_link_libraries(your_app PRIVATE xmotion::graph)".

## 3. Build the demo & pack the library

Expand All @@ -62,7 +62,7 @@ $ cpack
Demo programs will be built and put into "build/bin" folder. A ".deb" package would be generated inside "build" folder. Install the library with the ".deb" package using command "dpkg", for example

```
$ sudo dpkg -i libgraph_1.1_amd64.deb
$ sudo dpkg -i graph_1.1_amd64.deb
```

## 4. Build document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ find_dependency(Threads REQUIRED)
# Any extra setup

# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/libgraphTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/graphTargets.cmake")
Loading