I use CMake to config/generate the ITK 5.0 Xcode project
To Build library in Xcode with no error.
HelloWorld:
Find the HelloWorld resource in ITK 5.0 directory.
Use CMake to config/generate the Xcode project:
—2.1 set the ITK_DIR to ITK 5.0 binary directory
—2.2 config/generate the Xcode project
Build the Xcode project with too many issue:
—3.1Modify the CMakeLists.txt as Dzenanz suggested
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11) # Supported values are 11, 14, and 17.
endif()
if(NOT CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
if(NOT CMAKE_CXX_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
—3.2 rebuild the Xcode project
—3.3 then face the error as I listed
If there is any deficiency, please let me know, thanks!
The try-compile “issues” (ITK-4.13.2-Binary-Config-Issues-In-CMake.txt) are not important, they are checked so proper configuration (ITK-build\Modules\Core\Common\itkConfigure.h) can be made. Most people who develop on a Mac use XCode.
Which hello world example were you following, this or this? Can you supply CMakeLists.txt for your hello-world project? And your latest message is not quite clear to me: did everything work besides some warnings, or are you still failing to build your example?
Today, I delete all the resources and re-downland everything from beginning.
Everything works fine under ITK5.0 as I mentioned, I will use it to continue study/plan my project, and give up to study ITK4.13.2
Attached is my HelloWorld’s CMakeLists.txt: CMakeLists.txt (704 Bytes)
And as far as I am aware, ITK-SNAP is an end user application. It is not meant to be extended like Slicer, so there is no “developer documentation”.
ITK is written in C++. Can an ObjC program link to a C++ library?
This tutorial could get you started on CMake+XCode. There is the software guide, and Sphinx examples. Also many other resources, but this should be enough to get you started.