summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_ARGN.cmake
blob: e49ff22f6b89ba326a330c553079831e91bfb8c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if(WIN32)
    set(ENV{PKG_CONFIG} "\"${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat\" --static --print-errors")
else()
    set(ENV{PKG_CONFIG} "\"${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh\" --static --print-errors")
endif()

find_package(PkgConfig REQUIRED)

if(NOT PKG_CONFIG_ARGN STREQUAL "--static;--print-errors")
  message(SEND_ERROR "PKG_CONFIG_ARGN has wrong value '${PKG_CONFIG_ARGN}'")
endif()

_pkgconfig_invoke("none" "prefix" "output" "")

if(NOT prefix_output STREQUAL "Received;--static;Received;--print-errors")
  message(SEND_ERROR "prefix_output has wrong value '${prefix_output}'")
endif()