Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: use of imported Freetype target #5313

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions cmake/modules/CheckDependentLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,6 @@ endif()
# Language options
if(WITH_FREETYPE)
find_package(Freetype REQUIRED)
if(FREETYPE_FOUND)
add_library(FREETYPE INTERFACE IMPORTED GLOBAL)
set_property(
TARGET FREETYPE PROPERTY INTERFACE_LINK_LIBRARIES
${FREETYPE_LIBRARY${find_library_suffix}})
set_property(TARGET FREETYPE PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${FREETYPE_INCLUDE_DIRS})
endif()
endif()

if(WITH_NLS)
Expand Down Expand Up @@ -337,7 +329,7 @@ check_target(ZSTD HAVE_ZSTD_H)
check_target(BZIP2 HAVE_BZLIB_H)
check_target(Readline::Readline HAVE_READLINE_READLINE_H)
check_target(Readline::History HAVE_READLINE_HISTORY_H)
check_target(FREETYPE HAVE_FT2BUILD_H)
check_target(Freetype::Freetype HAVE_FT2BUILD_H)
# set(CMAKE_REQUIRED_INCLUDES "${FFTW_INCLUDE_DIR}") no target ATLAS in
# thirdpary/CMakeLists.txt
check_target(ATLAS HAVE_LIBATLAS)
Expand Down
5 changes: 3 additions & 2 deletions general/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ build_program_in_subdir(g.gisenv DEPENDS grass_gis)
build_program_in_subdir(g.mapset DEPENDS grass_gis)
build_program_in_subdir(g.mapsets DEPENDS grass_gis grass_parson)
build_program_in_subdir(g.message DEPENDS grass_gis)
build_program_in_subdir(g.mkfontcap DEPENDS grass_gis FREETYPE)
build_program_in_subdir(g.mkfontcap DEPENDS grass_gis PRIMARY_DEPENDS
Freetype::Freetype)
add_dependencies(g.mkfontcap fonts)
add_custom_command(
TARGET g.mkfontcap
Expand All @@ -17,7 +18,7 @@ add_custom_command(
> ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/fontcap)
install(FILES ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/fontcap
DESTINATION ${GRASS_INSTALL_ETCDIR})
build_program_in_subdir(g.parser DEPENDS grass_gis FREETYPE)
build_program_in_subdir(g.parser DEPENDS grass_gis)
build_program_in_subdir(g.pnmcomp DEPENDS grass_gis)
build_program_in_subdir(g.ppmtopng DEPENDS grass_gis PRIMARY_DEPENDS PNG::PNG)
build_program_in_subdir(g.proj DEPENDS grass_gis grass_gproj PROJ OPTIONAL_DEPENDS GDAL::GDAL)
Expand Down
4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ build_library_in_subdir(
"${use_math_DEFS}"
DEPENDS
grass_gis
FREETYPE
OPTIONAL_DEPENDS
Freetype::Freetype
Iconv::Iconv)

add_subdirectory(proj)
Expand Down Expand Up @@ -109,7 +109,7 @@ set(_grass_display_DEPENDS grass_driver grass_raster grass_htmldriver
grass_pngdriver grass_psdriver grass_gis)

if(WITH_CAIRO)
set(_cairodriver_DEPENDS CAIRO FREETYPE grass_gis grass_driver
set(_cairodriver_DEPENDS CAIRO Freetype::Freetype grass_gis grass_driver
OPTIONAL_DEPENDS Iconv::Iconv)
if(WITH_X11)
list(APPEND _cairodriver_DEPENDS X11)
Expand Down
5 changes: 3 additions & 2 deletions vector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,16 @@ build_program_in_subdir(
build_program_in_subdir(
v.label.sa
DEPENDS
FREETYPE
grass_dbmibase
grass_dbmiclient
grass_dbmidriver
grass_dig2
grass_display
grass_gis
grass_vector
${LIBM})
${LIBM}
PRIMARY_DEPENDS
Freetype::Freetype)

build_program_in_subdir(v.proj DEPENDS grass_gis grass_gproj grass_vector
${LIBM})
Expand Down
Loading