Would like to compile the ITK without external third-party libraries

Hi dzenanz,

New errors came.

The first error is for the GoogleTest module. In Cmake gui, I got:

CMake Error at C:/ITK/build/_deps/cleaver_lib-src/src/test/CMakeLists.txt:64 (add_library): add_library cannot create imported target “gtest” because another target with the same name already exists.

Therefore, I changed the Cmake file from

add_library(${GTEST_LIBRARY} UNKNOWN IMPORTED)

to

if(NOT TARGET {GTEST_LIBRARY}) add_library({GTEST_LIBRARY} UNKNOWN IMPORTED)
endif()

However, I got

Cannot open include file: ‘gtest/gtest.h‘: No such file or directory.

during building. I was confused about it.

The second one is errors of CDMTK.

error: DCMTK was configured to use C++ 11 features, but your compiler does not or was not configured to provide them.

The Visual Studio version is 2022, so it should be C++ 11. I attempted to add the following configuration into CmakeCahe.txt:

CMAKE_CXX_STANDARD=11

But it doesn’t work.