mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-16 22:27:41 -05:00
only use add_package when VERSION is present (#16)
This commit is contained in:
@@ -63,7 +63,7 @@ function(CPMAddPackage)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if (NOT ${CPM_REMOTE_PACKAGES_ONLY})
|
||||
if (CPM_ARGS_VERSION AND NOT ${CPM_REMOTE_PACKAGES_ONLY})
|
||||
find_package(${CPM_ARGS_NAME} ${CPM_ARGS_VERSION} QUIET)
|
||||
set(CPM_PACKAGE_FOUND ${CPM_ARGS_NAME}_FOUND)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user