mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Move the pkg_config_library macro to its own file
The pkg_config_library macro is a helper macro and was generating noise on the main CMakeLists.txt file, so I moved it to another file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e56580229b
commit
057231701e
2 changed files with 8 additions and 9 deletions
|
@ -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)
|
||||
|
|
7
cmake/Modules/pkgconfig_helper.cmake
Normal file
7
cmake/Modules/pkgconfig_helper.cmake
Normal file
|
@ -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()
|
Loading…
Reference in a new issue