2022-09-20 15:12:48 +08:00
|
|
|
project(DIDKit)
|
|
|
|
|
|
2022-09-21 08:52:11 +08:00
|
|
|
file(GLOB_RECURSE DIDKit_IO_headers ../src/src/IO/*.h)
|
|
|
|
|
file(GLOB_RECURSE DIDKit_IO_cpps ../src/src/IO/*.cpp)
|
|
|
|
|
file(GLOB_RECURSE DIDKit_PACS_headers ../src/src/PACS/*.h)
|
|
|
|
|
file(GLOB_RECURSE DIDKit_PACS_cpps ../src/src/PACS/*.cpp)
|
2022-09-23 13:13:41 +08:00
|
|
|
file(GLOB_RECURSE DIDKit_App_headers ./*/*.h)
|
|
|
|
|
file(GLOB_RECURSE DIDKit_App_cpps ./*/*.cpp)
|
2022-09-20 15:12:48 +08:00
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
|
|
|
if (${BUILD_SHARED_LIBS})
|
|
|
|
|
include_directories(Defines/)
|
|
|
|
|
endif()
|
|
|
|
|
include_directories(../src/src/)
|
2022-09-23 13:13:41 +08:00
|
|
|
include_directories(./App/)
|
2022-09-20 15:12:48 +08:00
|
|
|
|
|
|
|
|
add_library(DIDKit SHARED ${DIDKit_headers} ${DIDKit_cpps})
|
|
|
|
|
|
2022-09-21 08:52:11 +08:00
|
|
|
option(BUILD_DIDKit_APP "Build DIDKit App" ON)
|
|
|
|
|
set(BUILD_DIDKit_APP ON)
|
|
|
|
|
|
|
|
|
|
|
2022-09-20 15:12:48 +08:00
|
|
|
find_package(DCMTK REQUIRED)
|
|
|
|
|
include_directories(${DCMTK_INCLUDE_DIRS})
|
|
|
|
|
include_directories(${DCM_NETWORK_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
|
|
find_package(VTK REQUIRED)
|
|
|
|
|
include(${VTK_USE_FILE})
|
|
|
|
|
|
|
|
|
|
include_directories(${DCM_NETWORK_INCLUDE_DIRS})
|
2022-09-21 08:52:11 +08:00
|
|
|
|
|
|
|
|
target_link_libraries(DIDKit ${DCMTK_LIBRARIES})
|
|
|
|
|
target_link_libraries(DIDKit ${VTK_LIBRARIES})
|
2022-09-20 15:12:48 +08:00
|
|
|
target_link_libraries(DIDKit dcm_network)
|
2022-09-21 08:52:11 +08:00
|
|
|
add_dependencies(DIDKit dcm_network)
|
|
|
|
|
|
2022-09-23 13:13:41 +08:00
|
|
|
file(GLOB_RECURSE DIDKit_UI ./*/*.ui)
|
|
|
|
|
qt5_wrap_ui(DIDKit_UI_FILES ${DIDKit_UI})
|
|
|
|
|
|
2022-09-21 08:52:11 +08:00
|
|
|
if(${BUILD_DIDKit_APP})
|
2022-09-23 13:13:41 +08:00
|
|
|
add_executable(DIDKitApp ${DIDKit_IO_headers} ${DIDKit_IO_cpps} ${DIDKit_App_headers} ${DIDKit_App_cpps} ${DIDKit_PACS_headers} ${DIDKit_PACS_cpps} ${DIDKit_UI_FILES})
|
2022-09-21 08:52:11 +08:00
|
|
|
target_link_libraries(DIDKitApp ${DCMTK_LIBRARIES})
|
|
|
|
|
target_link_libraries(DIDKitApp ${VTK_LIBRARIES})
|
|
|
|
|
target_link_libraries(DIDKitApp dcm_network)
|
|
|
|
|
add_dependencies(DIDKitApp dcm_network)
|
|
|
|
|
target_link_libraries(DIDKitApp Qt5::Core Qt5::Widgets Qt5::Gui)
|
2022-09-23 13:13:41 +08:00
|
|
|
endif()
|