diff options
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r-- | examples/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 9af85fe2..6c1ca0f3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -34,12 +34,18 @@ foreach(PROG ${EXAMPLE_C_PROGRAMS}) endforeach() target_include_directories(pdf-create PRIVATE ${JPEG_INCLUDE}) +# extend-c-api contains a mixture of C and C++ files. +add_executable(extend-c-api extend-c-api-impl.cc extend-c-api.c) +set_property(TARGET extend-c-api PROPERTY LINKER_LANGUAGE CXX) +target_link_libraries(extend-c-api libqpdf) + add_test( NAME examples COMMAND ${RUN_QTEST} --top ${qpdf_SOURCE_DIR} --bin $<TARGET_FILE_DIR:pdf-create> --bin $<TARGET_FILE_DIR:qpdf> + --bin $<TARGET_FILE_DIR:qpdf-test-compare> --bin $<TARGET_FILE_DIR:libqpdf> # for Windows to find DLL --code ${qpdf_SOURCE_DIR}/examples --color ${QTEST_COLOR} @@ -47,7 +53,7 @@ add_test( --tc "${qpdf_SOURCE_DIR}/examples/*.cc" --tc "${qpdf_SOURCE_DIR}/examples/*.c") -file(GLOB EXAMPLES_SRC "*.c" "*.cc") +file(GLOB EXAMPLES_SRC "*.c" "*.cc" "*.h") if(INSTALL_EXAMPLES) install(FILES ${EXAMPLES_SRC} DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples |