mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 20:49:07 +08:00
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
|
diff --git a/cmake_modules/Findpg.cmake b/cmake_modules/Findpg.cmake
|
||
|
index 53037f2..d13f384 100644
|
||
|
--- a/cmake_modules/Findpg.cmake
|
||
|
+++ b/cmake_modules/Findpg.cmake
|
||
|
@@ -4,20 +4,14 @@
|
||
|
#
|
||
|
# This module defines PG_INCLUDE_DIRS, where to find header, etc. PG_LIBRARIES,
|
||
|
# the libraries needed to use PostgreSQL. pg_FOUND, If false, do not try to use
|
||
|
-# PostgreSQL.
|
||
|
-# pg_lib - The imported target library.
|
||
|
+# PostgreSQL. pg_lib - The imported target library.
|
||
|
|
||
|
find_package(PostgreSQL)
|
||
|
if(PostgreSQL_FOUND)
|
||
|
set(PG_LIBRARIES ${PostgreSQL_LIBRARIES})
|
||
|
set(PG_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIRS})
|
||
|
- message(STATUS "pg inc: " ${PostgreSQL_INCLUDE_DIRS})
|
||
|
add_library(pg_lib INTERFACE IMPORTED)
|
||
|
- set_target_properties(pg_lib
|
||
|
- PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||
|
- "${PostgreSQL_INCLUDE_DIRS}"
|
||
|
- INTERFACE_LINK_LIBRARIES
|
||
|
- "${PostgreSQL_LIBRARIES}")
|
||
|
+ target_link_libraries(pg_lib INTERFACE PostgreSQL::PostgreSQL)
|
||
|
mark_as_advanced(PG_INCLUDE_DIRS PG_LIBRARIES)
|
||
|
endif(PostgreSQL_FOUND)
|
||
|
include(FindPackageHandleStandardArgs)
|