From: Matthew Fernandez Date: Sun, 20 Mar 2022 23:37:07 +0000 (-0700) Subject: CMake: enable lib/glcomp X-Git-Tag: 4.0.0~161^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18f5b027d9bd166c7584d9f0b854fd92b61a8cd2;p=graphviz CMake: enable lib/glcomp Interestingly enabling this revealed that lib/glcomp also depends on Pango, something unexpressed in either the Autotools or MS Build build systems. Gitlab: #1836 --- diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1a311df56..6eccf6cda 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -7,6 +7,7 @@ add_subdirectory(dotgen) add_subdirectory(edgepaint) add_subdirectory(expr) add_subdirectory(fdpgen) +add_subdirectory(glcomp) add_subdirectory(gvpr) add_subdirectory(ingraphs) add_subdirectory(label) diff --git a/lib/glcomp/CMakeLists.txt b/lib/glcomp/CMakeLists.txt new file mode 100644 index 000000000..89ea35c84 --- /dev/null +++ b/lib/glcomp/CMakeLists.txt @@ -0,0 +1,66 @@ +if(with_smyrna) + + find_package(Freetype) + find_package(GLUT) + find_package(GTK2 COMPONENTS gtk glade) + find_package(PANGOCAIRO) + find_package(PkgConfig) + if(PKG_CONFIG_FOUND) + pkg_check_modules(XRENDER xrender) + endif() + + if(Freetype_FOUND AND GLUT_FOUND AND GTK2_FOUND AND PANGOCAIRO_FOUND + AND XRENDER_FOUND) + + add_library(glcomp + glcompbutton.h + glcompdefs.h + glcompfont.h + glcompimage.h + glcomplabel.h + glcompmouse.h + glcomppanel.h + glcompset.h + glcomptextpng.h + glcomptexture.h + glpangofont.h + glutils.h + + glcompbutton.c + glcompfont.c + glcompimage.c + glcomplabel.c + glcompmouse.c + glcomppanel.c + glcompset.c + glcomptextpng.c + glcomptexture.c + glpangofont.c + glutils.c + ) + + target_include_directories(glcomp PRIVATE + ${GRAPHVIZ_LIB_DIR} + ${GRAPHVIZ_LIB_DIR}/common + ) + + target_include_directories(glcomp SYSTEM PRIVATE + ${Freetype_INCLUDE_DIRS} + ${GLUT_INCLUDE_DIRS} + ${GTK2_INCLUDE_DIRS} + ${PANGOCAIRO_INCLUDE_DIRS} + ${XRENDER_INCLUDE_DIRS} + ) + + target_link_libraries(glcomp PRIVATE + ${Freetype_LIBRARIES} + ${GLUT_LIBRARIES} + ${GTK2_LIBRARIES} + ${MATH_LIB} + ${PANGOCAIRO_LIBRARIES} + ${XRENDER_LIBRARIES} + ) + + endif() + +endif()