aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules/pkgconfig_helper.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/pkgconfig_helper.cmake')
-rw-r--r--cmake/Modules/pkgconfig_helper.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/Modules/pkgconfig_helper.cmake b/cmake/Modules/pkgconfig_helper.cmake
new file mode 100644
index 000000000..afb523855
--- /dev/null
+++ b/cmake/Modules/pkgconfig_helper.cmake
@@ -0,0 +1,7 @@
+MACRO(pkg_config_library LIBNAME pcfile)
+ pkg_check_modules(${LIBNAME} REQUIRED ${pcfile})
+ include_directories(${${LIBNAME}_INCLUDE_DIRS})
+ link_directories(${${LIBNAME}_LIBRARY_DIRS})
+ add_definitions(${${LIBNAME}_CFLAGS_OTHER})
+ set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${${LIBNAME}_LIBRARIES})
+ENDMACRO()