diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 532491273..d7da0ebba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,22 +31,28 @@ ${CMAKE_CURRENT_BINARY_DIR}/tests/CTestCustom.cmake) ### Tests add_subdirectory(tests) -### Font Embedder - - set(fontembedder_SRCS fontembedder.cpp ) - kde4_add_executable(fontembedder ${fontembedder_SRCS}) - target_link_libraries(fontembedder ${KDE4_KIO_LIBS} ) - -### Line graphics font - +### Font Embedder and LineFont.h + option(KONSOLE_BUILD_FONTEMBEDDER "Konsole: build fontembedder executable" OFF) option(KONSOLE_GENERATE_LINEFONT "Konsole: regenerate LineFont file" OFF) - if(KONSOLE_GENERATE_LINEFONT) - add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/LineFont.h - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fontembedder - ARGS ${CMAKE_SOURCE_DIR}/LineFont.src - DEPENDS ${CMAKE_SOURCE_DIR}/LineFont.src ) - endif(KONSOLE_GENERATE_LINEFONT) + ### Use cmake -DKONSOLE_BUILD_FONTEMBEDDER or/and -DKONSOLE_GENERATE_LINEFONT=1 + if(KONSOLE_BUILD_FONTEMBEDDER OR KONSOLE_GENERATE_LINEFONT) + ### Font Embedder + set(fontembedder_SRCS fontembedder.cpp ) + kde4_add_executable(fontembedder ${fontembedder_SRCS}) + target_link_libraries(fontembedder ${KDE4_KIO_LIBS} ) + + ### Line graphics font + ### The below cmake doesn't work; it might be possible to automate it + ### if LineFont.src has changed. If automated, different OSes will + ### need to be handled. + ### If LineFont.h is needed to be recreated use: + ### fontembedder LineFont.src > LineFont.h + #add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/LineFont.h + # COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fontembedder + # ARGS ${CMAKE_SOURCE_DIR}/LineFont.src + # DEPENDS ${CMAKE_SOURCE_DIR}/LineFont.src ) + endif(KONSOLE_BUILD_FONTEMBEDDER OR KONSOLE_GENERATE_LINEFONT) ### Konsole source files shared between embedded terminal and main application # qdbuscpp2xml -m Session.h -o org.kde.konsole.Session.xml