summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--cmake/Modules/pkgconfig_helper.cmake7
2 files changed, 8 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 381532c98..4ba2d3381 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,16 +17,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
endif()
# pkgconfig for required libraries
-
FIND_PACKAGE(PkgConfig)
-
-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()
+INCLUDE(cmake/Modules/pkgconfig_helper.cmake)
pkg_config_library(LIBXML libxml-2.0)
pkg_config_library(LIBSQLITE3 sqlite3)
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()