diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 650bcaede2..cd4c40221b 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -69,11 +69,14 @@ set(CORE_MODULE_COMPONENTS p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet p3net p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline - p3pnmimage p3pnmtext p3pstatclient p3putil p3recorder p3text p3tform) + p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform) if(HAVE_AUDIO) list(APPEND CORE_MODULE_COMPONENTS p3audio) endif() +if(HAVE_FREETYPE) + list(APPEND CORE_MODULE_COMPONENTS p3pnmtext) +endif() add_python_module(core ${CORE_MODULE_COMPONENTS}) diff --git a/panda/src/pnmtext/CMakeLists.txt b/panda/src/pnmtext/CMakeLists.txt index 534b9a80e3..33a332389f 100644 --- a/panda/src/pnmtext/CMakeLists.txt +++ b/panda/src/pnmtext/CMakeLists.txt @@ -1,19 +1,21 @@ -set(P3PNMTEXT_HEADERS - config_pnmtext.h - freetypeFace.h freetypeFace.I - freetypeFont.h freetypeFont.I - pnmTextGlyph.h pnmTextGlyph.I - pnmTextMaker.h pnmTextMaker.I -) -set(P3PNMTEXT_SOURCES - config_pnmtext.cxx - freetypeFace.cxx - freetypeFont.cxx - pnmTextGlyph.cxx - pnmTextMaker.cxx -) +if(HAVE_FREETYPE) + set(P3PNMTEXT_HEADERS + config_pnmtext.h + freetypeFace.h freetypeFace.I + freetypeFont.h freetypeFont.I + pnmTextGlyph.h pnmTextGlyph.I + pnmTextMaker.h pnmTextMaker.I + ) + set(P3PNMTEXT_SOURCES + config_pnmtext.cxx + freetypeFace.cxx + freetypeFont.cxx + pnmTextGlyph.cxx + pnmTextMaker.cxx + ) -composite_sources(p3pnmtext P3PNMTEXT_SOURCES) -add_library(p3pnmtext ${P3PNMTEXT_SOURCES} ${P3PNMTEXT_HEADERS}) -target_link_libraries(p3pnmtext p3pnmimage ${_FREETYPE_LIBRARIES}) -target_interrogate(p3pnmtext ALL) + composite_sources(p3pnmtext P3PNMTEXT_SOURCES) + add_library(p3pnmtext ${P3PNMTEXT_SOURCES} ${P3PNMTEXT_HEADERS}) + target_link_libraries(p3pnmtext p3pnmimage ${_FREETYPE_LIBRARIES}) + target_interrogate(p3pnmtext ALL) +endif() diff --git a/panda/src/text/CMakeLists.txt b/panda/src/text/CMakeLists.txt index 1815b6e529..1fa5fe5155 100644 --- a/panda/src/text/CMakeLists.txt +++ b/panda/src/text/CMakeLists.txt @@ -34,5 +34,8 @@ set(P3TEXT_SOURCES composite_sources(p3text P3TEXT_SOURCES) add_library(p3text ${P3TEXT_SOURCES} ${P3TEXT_HEADERS}) -target_link_libraries(p3text p3pnmtext p3parametrics ${_FREETYPE_LIBRARIES}) +target_link_libraries(p3text p3parametrics) +if(HAVE_FREETYPE) + target_link_libraries(p3text p3pnmtext ${_FREETYPE_LIBRARIES}) +endif() target_interrogate(p3text ALL)