Skip to content

Commit

Permalink
Make sure common_find_package_disable() works under all conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
tribal-tec committed Dec 18, 2018
1 parent 05cc840 commit 89c330d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CommonFindPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ option(COMMON_FIND_PACKAGE_QUIET "Use QUIET for common_find_package command" ON)
macro(common_find_package Package_Name)
string(TOUPPER ${Package_Name} PACKAGE_NAME)

# ensure outputs vars exists
if(NOT COMMON_FIND_PACKAGE_DEFINES)
set(COMMON_FIND_PACKAGE_DEFINES "")
endif()
if(NOT ${PROJECT_NAME}_FIND_PACKAGES_FOUND)
set(${PROJECT_NAME}_FIND_PACKAGES_FOUND "")
endif()
if(NOT ${PROJECT_NAME}_FIND_PACKAGES_NOTFOUND)
set(${PROJECT_NAME}_FIND_PACKAGES_NOTFOUND "")
endif()

# Parse macro arguments
set(__options QUIET REQUIRED SYSTEM)
set(__oneValueArgs MODULE)
Expand Down

0 comments on commit 89c330d

Please sign in to comment.