diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 275276f..b6917a7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,115 +1,112 @@ # # Copyright (c) 2010-2016, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if (POLICY CMP0063) cmake_policy(SET CMP0063 NEW) endif (POLICY CMP0063) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) find_package(TIFF REQUIRED) include_directories(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${TIFF_INCLUDE_DIR}) find_package(KF5KDcraw 5.0.0) find_package(KF5KExiv2 5.0.0) if(KF5KDcraw_FOUND) message(STATUS "libkdcraw detected : test Kipi interface will support Raw processing") add_definitions(-DHAVE_KDCRAW) else() message(STATUS "libkdcraw not detected : test Kipi interface will not support Raw processing") endif() if(KF5KExiv2_FOUND) message(STATUS "libkexiv2 detected : test Kipi interface will support Metadata processing") add_definitions(-DHAVE_KEXIV2) else() message(STATUS "libkexiv2 not detected : test Kipi interface will not support Metadata processing") endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/../src ${CMAKE_CURRENT_SOURCE_DIR}/../src ${CMAKE_CURRENT_SOURCE_DIR}/imageio ${CMAKE_CURRENT_SOURCE_DIR}/common ${CMAKE_CURRENT_SOURCE_DIR}/kxmlkipicmd ) -add_subdirectory(plugins) - -#---------------------------------------------------------------------------------------------------- - -set(kxmlkipicmd_SRCS - imageio/iccjpeg.c - imageio/kipiwritehelp.cpp - imageio/kipiwriteimage.cpp +set(kipicommon_SRCS + common/iccjpeg.c + common/kipiwritehelp.cpp + common/kipiwriteimage.cpp common/kipiinterface.cpp common/kipiimagecollectionshared.cpp common/kipiimageinfoshared.cpp common/kipiimagecollectionselector.cpp common/kipiuploadwidget.cpp +) + +add_subdirectory(plugins) + +#---------------------------------------------------------------------------------------------------- + +set(kxmlkipicmd_SRCS + ${kipicommon_SRCS} kxmlkipicmd/kipitestmainwindow.cpp kxmlkipicmd/kipitestpluginloader.cpp kxmlkipicmd/kipisetup.cpp kxmlkipicmd/main.cpp ) add_executable(kxmlkipicmd ${kxmlkipicmd_SRCS}) target_link_libraries(kxmlkipicmd ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${PNG_LIBRARIES} Qt5::Core Qt5::Gui KF5Kipi ) if(KF5KDcraw_FOUND) target_link_libraries(kxmlkipicmd KF5::KDcraw) endif() if(KF5KExiv2_FOUND) target_link_libraries(kxmlkipicmd KF5::KExiv2) endif() install(TARGETS kxmlkipicmd DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES kxmlkipicmd/kxmlkipicmd_defaultui.rc DESTINATION ${DATA_INSTALL_DIR}/kxmlkipicmd) install(FILES kxmlkipicmd/kxmlkipicmd_gwenviewui.rc DESTINATION ${DATA_INSTALL_DIR}/kxmlkipicmd) #---------------------------------------------------------------------------------------------------- set(kipicmd_SRCS - imageio/iccjpeg.c - imageio/kipiwritehelp.cpp - imageio/kipiwriteimage.cpp - common/kipiinterface.cpp - common/kipiimagecollectionshared.cpp - common/kipiimageinfoshared.cpp - common/kipiimagecollectionselector.cpp - common/kipiuploadwidget.cpp + ${kipicommon_SRCS} kipicmd/main.cpp ) add_executable(kipicmd ${kipicmd_SRCS}) target_link_libraries(kipicmd ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${PNG_LIBRARIES} Qt5::Core Qt5::Gui KF5Kipi ) if(KF5KDcraw_FOUND) target_link_libraries(kipicmd KF5::KDcraw) endif() if(KF5KExiv2_FOUND) target_link_libraries(kipicmd KF5::KExiv2) endif() diff --git a/tests/imageio/iccjpeg.c b/tests/common/iccjpeg.c similarity index 100% rename from tests/imageio/iccjpeg.c rename to tests/common/iccjpeg.c diff --git a/tests/imageio/iccjpeg.h b/tests/common/iccjpeg.h similarity index 100% rename from tests/imageio/iccjpeg.h rename to tests/common/iccjpeg.h diff --git a/tests/imageio/kipiwritehelp.cpp b/tests/common/kipiwritehelp.cpp similarity index 100% rename from tests/imageio/kipiwritehelp.cpp rename to tests/common/kipiwritehelp.cpp diff --git a/tests/imageio/kipiwritehelp.h b/tests/common/kipiwritehelp.h similarity index 100% rename from tests/imageio/kipiwritehelp.h rename to tests/common/kipiwritehelp.h diff --git a/tests/imageio/kipiwriteimage.cpp b/tests/common/kipiwriteimage.cpp similarity index 100% rename from tests/imageio/kipiwriteimage.cpp rename to tests/common/kipiwriteimage.cpp diff --git a/tests/imageio/kipiwriteimage.h b/tests/common/kipiwriteimage.h similarity index 100% rename from tests/imageio/kipiwriteimage.h rename to tests/common/kipiwriteimage.h