Skip to content

Commit

Permalink
add install deps option
Browse files Browse the repository at this point in the history
  • Loading branch information
lkpworkspace committed Oct 24, 2023
1 parent 3c62168 commit 538fdee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(myframe VERSION 0.8.4)

### option
option(MYFRAME_USE_CV "Using conditional variables for thread communication" OFF)
option(MYFRAME_INSTALL_DEPS "Install deps" ON)
option(MYFRAME_GENERATE_EXAMPLE "Generate example library" ON)
option(MYFRAME_GENERATE_TEST "Generate test executable program" ON)

Expand Down Expand Up @@ -82,6 +83,12 @@ install(CODE "
\"${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}\"
)
")
if (MYFRAME_INSTALL_DEPS)
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.21")
install(IMPORTED_RUNTIME_ARTIFACTS jsoncpp_lib)
install(IMPORTED_RUNTIME_ARTIFACTS glog::glog)
endif()
endif()

### package
include(InstallRequiredSystemLibraries)
Expand Down

0 comments on commit 538fdee

Please sign in to comment.