diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index c081f58bab..c22bd713a0 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -1,26 +1,30 @@ SUPPRESS_ALL_WARNINGS() # most stuff of these uses itk_zlib.h (via mitkIpPic.h) find_package(ITK) include(${ITK_USE_FILE}) # some legacy util files include in the old style with prefixed directory, # like #include include_directories(.) subdirs( IpPic IpFunc IpSegmentation mbilog - qtsingleapplication KWStyle ) # mbilog is independent of mitk, and cant use mitk macros # configuring happens through mbilog/mbilogConfig.cmake.in set(mbilog_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/mbilog" "${CMAKE_CURRENT_BINARY_DIR}/mbilog") set(mbilog_CONFIG_FILE "${PROJECT_BINARY_DIR}/${MODULES_CONF_DIRNAME}/mbilogConfig.cmake" CACHE INTERNAL "Path to module config" FORCE) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mbilog/mbilogConfig.cmake.in" "${mbilog_CONFIG_FILE}") set_property(GLOBAL APPEND PROPERTY MITK_MODULE_TARGETS mbilog) + +set(MITK_MODULE_NAME_REGEX_MATCH ) +set(MITK_MODULE_NAME_REGEX_NOT_MATCH ) +set(MITK_MODULE_NAME_PREFIX ) +add_subdirectory(qtsingleapplication) diff --git a/Utilities/qtsingleapplication/CMakeLists.txt b/Utilities/qtsingleapplication/CMakeLists.txt index e5dc6daa27..b044f6758a 100644 --- a/Utilities/qtsingleapplication/CMakeLists.txt +++ b/Utilities/qtsingleapplication/CMakeLists.txt @@ -1,38 +1,5 @@ - -if(MITK_USE_Qt4) # only if MITK is built with Qt 4 - -project(QtSingleApplication) - -set(_MOC_HEADERS - qtlocalpeer.h - qtsingleapplication.h - qtsinglecoreapplication.h +mitk_create_module( + PACKAGE_DEPENDS Qt4|QtNetwork+QtGui + FORCE_STATIC + NO_INIT ) - -set(_HEADERS - qthandlenewappinstance.h - qtlockedfile.h -) - -set(_SOURCES - qthandlenewappinstance.cpp - qtlocalpeer.cpp - qtsingleapplication.cpp - qtsinglecoreapplication.cpp -) - -find_package(Qt4 REQUIRED) -set(QT_USE_QTNETWORK 1) -include(${QT_USE_FILE}) - -qt4_wrap_cpp(_SOURCES ${_MOC_HEADERS}) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -add_library(qtsingleapplication STATIC ${_SOURCES}) -target_link_libraries(qtsingleapplication ${QT_LIBRARIES}) - -MITK_CREATE_MODULE_CONF(qtsingleapplication - INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} - PACKAGE_DEPENDS Qt4|QtNetwork+QtGui) - -endif(MITK_USE_Qt4) # only if MITK is built with Qt 4 diff --git a/Utilities/qtsingleapplication/files.cmake b/Utilities/qtsingleapplication/files.cmake new file mode 100644 index 0000000000..bbe96fa299 --- /dev/null +++ b/Utilities/qtsingleapplication/files.cmake @@ -0,0 +1,15 @@ +set(MOC_H_FILES + qtlocalpeer.h + qtsingleapplication.h + qtsinglecoreapplication.h +) + +set(CPP_FILES + qthandlenewappinstance.h + qtlockedfile.h + + qthandlenewappinstance.cpp + qtlocalpeer.cpp + qtsingleapplication.cpp + qtsinglecoreapplication.cpp +)