Skip to content

Commit

Permalink
Test TARGET PkgConfig::
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodr committed Aug 11, 2018
1 parent 675c0f5 commit 4939a0e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chapter-03/recipe-09/c-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pkg_search_module(
IMPORTED_TARGET
)

if(ZeroMQ_FOUND)
if(TARGET PkgConfig::ZeroMQ)
message(STATUS "Found ZeroMQ")
endif()

Expand Down
2 changes: 1 addition & 1 deletion chapter-05/recipe-08/c-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(PkgConfig REQUIRED QUIET)
pkg_search_module(UUID REQUIRED uuid IMPORTED_TARGET)
if(UUID_FOUND)
if(TARGET PkgConfig::UUID)
message(STATUS "Found libuuid")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FortranCInterface_VERIFY()

find_package(PkgConfig REQUIRED QUIET)
pkg_search_module(UUID REQUIRED uuid IMPORTED_TARGET)
if(UUID_FOUND)
if(TARGET PkgConfig::UUID)
message(STATUS "Found libuuid")
endif()
find_package(Backtrace REQUIRED)
Expand Down
3 changes: 2 additions & 1 deletion chapter-10/recipe-01/cxx-example/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(UUID uuid IMPORTED_TARGET)
if(UUID_FOUND)
if(TARGET PkgConfig::UUID)
message(STATUS "Found libuuid")
set(UUID_FOUND TRUE)
endif()
endif()

Expand Down
3 changes: 2 additions & 1 deletion chapter-10/recipe-02/cxx-example/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(UUID uuid IMPORTED_TARGET)
if(UUID_FOUND)
if(TARGET PkgConfig::UUID)
message(STATUS "Found libuuid")
set(UUID_FOUND TRUE)
endif()
endif()

Expand Down
3 changes: 2 additions & 1 deletion chapter-10/recipe-03/cxx-example/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(UUID uuid IMPORTED_TARGET)
if(UUID_FOUND)
if(TARGET PkgConfig::UUID)
message(STATUS "Found libuuid")
set(UUID_FOUND TRUE)
endif()
endif()

Expand Down

0 comments on commit 4939a0e

Please sign in to comment.