File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ find_package (PkgConfig )
2+ if (PKG_CONFIG_FOUND)
3+ pkg_check_modules (PC_GD QUIET GD )
4+ endif ()
15
2- find_path (GD_INCLUDE_DIR
3- "gd.h"
4- REQUIRED )
6+ find_path (GD_INCLUDE_DIR
7+ NAMES gd.h
8+ HINTS "${PC_GD_INCLUDE_DIRS} "
9+ REQUIRED
10+ )
511
6- find_library (GD_LIBRARY
7- gd
8- REQUIRED
9- )
12+ find_library (GD_LIBRARY
13+ NAMES gd
14+ HINTS "${PC_GD_INCLUDE_DIRS} "
15+ REQUIRED
16+ )
1017
1118cmake_path (ABSOLUTE_PATH GD_LIBRARY )
1219cmake_path (ABSOLUTE_PATH GD_INCLUDE_DIR )
@@ -24,12 +31,14 @@ find_package_handle_standard_args(GD
2431if (GD_FOUND)
2532 set (GD_LIBRARIES "${GD_LIBRARY} " )
2633 set (GD_INCLUDE_DIRS "${GD_INCLUDE_DIR} " )
34+ set (Foo_DEFINITIONS ${PC_GD_CFLAGS_OTHER} )
2735endif ()
2836
2937if (GD_FOUND AND NOT TARGET GD::GD)
3038 add_library (GD::GD UNKNOWN IMPORTED )
3139 set_target_properties (GD::GD PROPERTIES
3240 IMPORTED_LOCATION "${GD_LIBRARY} "
41+ INTERFACE_COMPILE_OPTIONS "${PC_GD_CFLAGS_OTHER} "
3342 INTERFACE_INCLUDE_DIRECTORIES "${GD_INCLUDE_DIR} "
3443 )
3544endif ()
You can’t perform that action at this time.
0 commit comments