-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move contrib block in root CMakeLists.txt into contrib subdirs (scale…
…s better)
- Loading branch information
Joe Drago
committed
Jun 22, 2020
1 parent
e4bfb23
commit 98d9f4b
Showing
3 changed files
with
33 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2020 Joe Drago. All rights reserved. | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
add_subdirectory(gdk-pixbuf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2020 Emmanuel Gil Peyrot. All rights reserved. | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
option(AVIF_BUILD_GDK_PIXBUF "Build a gdk-pixbuf loader" OFF) | ||
if(AVIF_BUILD_GDK_PIXBUF) | ||
find_package(PkgConfig) | ||
if(PKG_CONFIG_FOUND) | ||
pkg_search_module(GDK_PIXBUF gdk-pixbuf-2.0) | ||
if(GDK_PIXBUF_FOUND) | ||
set(GDK_PIXBUF_SRCS | ||
loader.c | ||
) | ||
add_library(pixbufloader-avif ${GDK_PIXBUF_SRCS}) | ||
|
||
# This is required because glib stupidly uses invalid #define names, such as __G_LIB_H__… | ||
add_definitions(-Wno-reserved-id-macro) | ||
target_link_libraries(pixbufloader-avif PUBLIC ${GDK_PIXBUF_LIBRARIES} avif) | ||
target_include_directories(pixbufloader-avif PUBLIC ${GDK_PIXBUF_INCLUDE_DIRS}) | ||
|
||
pkg_get_variable(GDK_PIXBUF_MODULEDIR gdk-pixbuf-2.0 gdk_pixbuf_moduledir) | ||
install(TARGETS pixbufloader-avif DESTINATION ${GDK_PIXBUF_MODULEDIR}) | ||
else() | ||
message(WARNING "gdk-pixbuf loader: disabled due to missing gdk-pixbuf-2.0") | ||
endif() | ||
else() | ||
message(WARNING "gdk-pixbuf loader: disabled due to missing pkg-config") | ||
endif() | ||
endif() |