Skip to content

Commit

Permalink
Modularized itk as CTKitk, mitk as CTKmitk.
Browse files Browse the repository at this point in the history
  • Loading branch information
al-sabr committed Feb 8, 2021
1 parent 5fab56f commit 8a5ee6e
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 29 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#
###########################################################################

SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "" FORCE)

cmake_minimum_required(VERSION 3.0)

foreach(p
Expand Down Expand Up @@ -325,7 +327,6 @@ set(ITK_VERSION
# enough to distinguish available features of the toolkit.
set(ITK_VERSION_STRING "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}")

message("ITK_VERSION: ${ITK_VERSION}")
#-----------------------------------------------------------------------------
# Testing
#
Expand Down Expand Up @@ -1386,6 +1387,4 @@ add_subdirectory( Documentation )
# The commands in this directory are intended to be executed as
# the end of the whole configuration process, as a "last step".
# This directory is typically the last SUBDIRS in the main CMakeLists.txt.
add_subdirectory(CMake/LastConfigureStep)

#ctkDebugVariables()
add_subdirectory(CMake/LastConfigureStep)
16 changes: 0 additions & 16 deletions Libs/AppUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
#[[
if(UNIX AND NOT APPLE)
set(qt5_depends "${qt5_depends}+X11Extras")
endif()

mitk_create_module(
PACKAGE_DEPENDS
PUBLIC CTK|CTKPluginFramework ${qt5_depends} Poco|Util
PRIVATE VTK
DEPENDS
PUBLIC qtsingleapplication
PRIVATE MitkCore
)
]]

project(CTKAppUtil)

include(files.cmake)

find_package(CppMicroServices COMPONENTS usLogService usWebConsole usHttpService)
#
# See CTK/CMake/ctkMacroBuildLib.cmake for details
#
Expand Down
4 changes: 2 additions & 2 deletions Libs/AppUtil/mitkBaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ namespace mitk
void BaseApplication::initializeCppMicroServices()
{
auto storageDir = this->getProperty(ctkPluginConstants::FRAMEWORK_STORAGE).toString();
/*

if (!storageDir.isEmpty())
us::ModuleSettings::SetStoragePath((storageDir + "us" + QDir::separator()).toStdString());
*/

}

QCoreApplication *BaseApplication::getQApplication() const
Expand Down
18 changes: 13 additions & 5 deletions Libs/AppUtil/target_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
set(target_libraries
CTKCore
CTKPluginFramework
CppMicroServices
CTKmitk
CTKqtsingleapplication
CppMicroServices
Qt5::Widgets Qt5::WebEngine
Poco::Util
)

if(UNIX AND NOT APPLE)
set(qt5_depends {qt5_depends} X11Extras)

if(CTK_QT_VERSION VERSION_GREATER "4")
list(APPEND target_libraries Qt5::Widgets Qt5::WebEngine)
if(UNIX AND NOT APPLE)
set(qt5_depends {qt5_depends} X11Extras)
list(APPEND target_libraries qt5_depends)
endif()
endif()
endif()

if (CTK_QT_VERSION VERSION_LESS "5")
list(APPEND target_libraries QT_LIBRARIES)
endif()

14 changes: 13 additions & 1 deletion Libs/itk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,20 @@ ctkMacroBuildLib(
MOC_SRCS ${KIT_MOC_SRCS}
TARGET_LIBRARIES ${KIT_target_libraries}
LIBRARY_TYPE ${CTK_LIBRARY_MODE}
BYPASS_REGEX TRUE
)

#[[]]
# Extra path for linking.
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(ITKSYS_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}")
else()
set(ITKSYS_PATH "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}")
endif()

message("ITKSYS_PATH = ${ITKSYS_PATH}")
ctkFunctionGetTargetLibraries(itksys)
target_link_libraries(${PROJECT_NAME} "${ITKSYS_PATH}/itksys.lib")


target_link_libraries(${PROJECT_NAME} "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/MinSizeRel/itksys.lib")
#ctkMacroDebugVariables()
14 changes: 13 additions & 1 deletion Libs/mbilog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,16 @@ ctkMacroBuildLib(
LIBRARY_TYPE ${CTK_LIBRARY_MODE}
BYPASS_REGEX TRUE
#GENERATE_EXPORT_HEADER TRUE
)
)

# Extra path for linking.
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(ITKSYS_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}")
else()
set(ITKSYS_PATH "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}")
endif()

message("ITKSYS_PATH = ${ITKSYS_PATH}")
#[[]]
ctkFunctionGetTargetLibraries(itksys)
target_link_libraries(${PROJECT_NAME} "${ITKSYS_PATH}/itksys.lib")

0 comments on commit 8a5ee6e

Please sign in to comment.