mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
cmake: add gobject-2.0 library to GLIB2_LIBRARIES
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3eb0cdd7f1
commit
5700b825b6
1 changed files with 11 additions and 4 deletions
|
@ -29,10 +29,15 @@ find_library(GLIB2_LIBRARY
|
|||
HINTS ${PC_LibGLIB2_LIBDIR}
|
||||
)
|
||||
|
||||
set(GLIB2_LIBRARIES ${GLIB2_LIBRARY})
|
||||
find_library(GOBJECT2_LIBRARY
|
||||
NAMES gobject-2.0
|
||||
HINTS ${PC_LibGLIB2_LIBDIR}
|
||||
)
|
||||
|
||||
set(GLIB2_LIBRARIES ${GLIB2_LIBRARY} ${GOBJECT2_LIBRARY})
|
||||
|
||||
# search the glibconfig.h include dir under the same root where the library is found
|
||||
get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
|
||||
get_filename_component(glib2LibDir "${GLIB2_LIBRARY}" PATH)
|
||||
|
||||
find_path(GLIB2_INTERNAL_INCLUDE_DIR
|
||||
NAMES glibconfig.h
|
||||
|
@ -49,6 +54,8 @@ if(GLIB2_INTERNAL_INCLUDE_DIR)
|
|||
endif(GLIB2_INTERNAL_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(GLIB2
|
||||
REQUIRED_VARS GLIB2_LIBRARIES GLIB2_LIBRARY GOBJECT2_LIBRARY GLIB2_MAIN_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)
|
||||
mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES GLIB2_LIBRARY GOBJECT2_LIBRARY)
|
||||
|
|
Loading…
Add table
Reference in a new issue