equal
deleted
inserted
replaced
|
1 |
|
2 macro(find_package_or_fail _PKG_NAME) |
|
3 find_package(${_PKG_NAME}) |
|
4 string(TOUPPER ${_PKG_NAME} _PKG_NAME_UP) |
|
5 if(NOT ${_PKG_NAME_UP}_FOUND) |
|
6 message(SEND_ERROR "Missing ${_PKG_NAME}! Please install it and rerun cmake.") |
|
7 endif(NOT ${_PKG_NAME_UP}_FOUND) |
|
8 endmacro(find_package_or_fail _PKG_NAME) |
|
9 |
|
10 macro(find_package_or_disable _PKG_NAME _VAR_NAME) |
|
11 find_package(${_PKG_NAME}) |
|
12 string(TOUPPER ${_PKG_NAME} _PKG_NAME_UP) |
|
13 if(NOT ${_PKG_NAME_UP}_FOUND) |
|
14 message(SEND_ERROR "Missing ${_PKG_NAME}! Rerun cmake with -D${_VAR_NAME}=1 to build without it.") |
|
15 endif(NOT ${_PKG_NAME_UP}_FOUND) |
|
16 endmacro(find_package_or_disable _PKG_NAME _VAR_NAME) |
|
17 |
|
18 #TODO: find_package_or_bundle |
|
19 |