Skip to content

Commit

Permalink
Improve CMakeLists config path by using CMAKE_CURRENT_BINARY_DIR
Browse files Browse the repository at this point in the history
* Change CMAKE_BINARY_DIR -> CMAKE_CURRENT_BINARY_DIR so when the project is a subdirectory of some other project (e.g. apriltags_ros), it can be configured properly
  • Loading branch information
Ewing Kang committed Mar 5, 2024
1 parent 51466ec commit 64e9040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export(TARGETS apriltag

# install pkgconfig file
configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")


Expand Down

0 comments on commit 64e9040

Please sign in to comment.