| 1 |
# Distributed under the original FontForge BSD 3-clause license |
| 2 |
|
| 3 |
add_library(gutils OBJECT |
| 4 |
dlist.cpp |
| 5 |
ffdir.cpp |
| 6 |
fsys.cpp |
| 7 |
gcol.c |
| 8 |
gimagebmpP.h |
| 9 |
gimage.c |
| 10 |
gimagereadbmp.c |
| 11 |
gimageread.cpp |
| 12 |
gimagereadgif.c |
| 13 |
gimagereadjpeg.cpp |
| 14 |
gimagereadpng.c |
| 15 |
gimagereadras.c |
| 16 |
gimagereadrgb.c |
| 17 |
gimagereadtiff.c |
| 18 |
gimagereadxbm.c |
| 19 |
gimagereadxpm.c |
| 20 |
gimagewritebmp.c |
| 21 |
gimagewritegimage.c |
| 22 |
gimagewritejpeg.cpp |
| 23 |
gimagewritepng.cpp |
| 24 |
gimagewritexbm.c |
| 25 |
gimagewritexpm.cpp |
| 26 |
gutils.cpp |
| 27 |
gwwintl.cpp |
| 28 |
prefs.c |
| 29 |
) |
| 30 |
|
| 31 |
if(BUILD_SHARED_LIBS) |
| 32 |
set_property(TARGET gutils PROPERTY POSITION_INDEPENDENT_CODE ON) |
| 33 |
endif() |
| 34 |
|
| 35 |
if(Intl_FOUND) |
| 36 |
list(APPEND gutils_LIBRARIES Intl::Intl) |
| 37 |
endif() |
| 38 |
if(ENABLE_LIBGIF_RESULT) |
| 39 |
list(APPEND gutils_LIBRARIES GIF::GIF) |
| 40 |
endif() |
| 41 |
if(ENABLE_LIBJPEG_RESULT) |
| 42 |
list(APPEND gutils_LIBRARIES JPEG::JPEG) |
| 43 |
endif() |
| 44 |
if(ENABLE_LIBPNG_RESULT) |
| 45 |
list(APPEND gutils_LIBRARIES PNG::PNG) |
| 46 |
endif() |
| 47 |
if(ENABLE_LIBTIFF_RESULT) |
| 48 |
list(APPEND gutils_LIBRARIES TIFF::TIFF) |
| 49 |
endif() |
| 50 |
|
| 51 |
if(${CMAKE_VERSION} VERSION_LESS "3.12.0") |
| 52 |
make_object_interface(gutils |
| 53 |
fontforge_common_headers |
| 54 |
gunicode_interface |
| 55 |
${gutils_LIBRARIES} |
| 56 |
) |
| 57 |
else() |
| 58 |
target_link_libraries(gutils |
| 59 |
PUBLIC |
| 60 |
fontforge_common_headers |
| 61 |
gunicode |
| 62 |
${gutils_LIBRARIES} |
| 63 |
) |
| 64 |
endif() |