Commit bebfc236 authored by Emmanuelle Sarrazin's avatar Emmanuelle Sarrazin
parent 09d3412a
set BUILD_DIR=%SRC_DIR%\bld
mkdir %BUILD_DIR%
cd %BUILD_DIR%
SET CXX_FLAGS="%CXX_FLAGS% /MP"
REM Configure Step
cmake -G "%CMAKE_GENERATOR%" ^
-D BUILD_SHARED_LIBS:BOOL=ON ^
-D BUILD_TESTING:BOOL=OFF ^
-D BUILD_EXAMPLES:BOOL=OFF ^
-D ITK_USE_SYSTEM_EXPAT:BOOL=ON ^
-D ITK_USE_SYSTEM_JPEG:BOOL=ON ^
-D ITK_USE_SYSTEM_PNG:BOOL=ON ^
-D ITK_USE_SYSTEM_TIFF:BOOL=ON ^
-D ITK_USE_SYSTEM_ZLIB:BOOL=ON ^
-D ITK_USE_KWSTYLE:BOOL=OFF ^
-D ITK_BUILD_DEFAULT_MODULES:BOOL=ON ^
-D Module_ITKReview:BOOL=ON ^
-D "CMAKE_SYSTEM_PREFIX_PATH:PATH=%LIBRARY_PREFIX%" ^
-D "CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX%" ^
"%SRC_DIR%"
if errorlevel 1 exit 1
REM Build step
cmake --build . --config Release
if errorlevel 1 exit 1
REM Install step
cmake -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -P %BUILD_DIR%\cmake_install.cmake
if errorlevel 1 exit 1
#!/bin/bash
# When building 32-bits on 64-bit system this flags is not automatically set by conda-build
if [ $ARCH == 32 -a "${OSX_ARCH:-notosx}" == "notosx" ]; then
export CFLAGS="${CFLAGS} -m32"
export CXXFLAGS="${CXXFLAGS} -m32"
fi
BUILD_DIR=${SRC_DIR}/build
mkdir ${BUILD_DIR}
cd ${BUILD_DIR}
cmake \
-G "Ninja" \
${CMAKE_ARGS} \
-D BUILD_SHARED_LIBS:BOOL=ON \
-D BUILD_TESTING:BOOL=OFF \
-D BUILD_EXAMPLES:BOOL=OFF \
-D ITK_USE_SYSTEM_EXPAT:BOOL=ON \
-D ITK_USE_SYSTEM_HDF5:BOOL=ON \
-D ITK_USE_SYSTEM_JPEG:BOOL=ON \
-D ITK_USE_SYSTEM_PNG:BOOL=ON \
-D ITK_USE_SYSTEM_TIFF:BOOL=ON \
-D ITK_USE_SYSTEM_ZLIB:BOOL=ON \
-D ITK_USE_KWSTYLE:BOOL=OFF \
-D ITK_BUILD_DEFAULT_MODULES:BOOL=ON \
-D Module_ITKReview:BOOL=ON \
-D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D "CMAKE_SYSTEM_PREFIX_PATH:FILEPATH=${PREFIX}" \
-D "CMAKE_INSTALL_PREFIX=${PREFIX}" \
"${SRC_DIR}"
ninja -j 4
cmake \
-D CMAKE_INSTALL_PREFIX=$PREFIX \
-P ${BUILD_DIR}/cmake_install.cmake
# This is the root ITK CMakeLists file.
cmake_minimum_required(VERSION 2.8.9)
if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
endif()
# This project is designed to be built outside the Insight source tree.
project(HelloWorld)
# Find ITK.
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
add_executable(HelloWorld HelloWorld.cxx )
target_link_libraries(HelloWorld ${ITK_LIBRARIES})
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
// Software Guide : BeginLatex
//
// The following code is an implementation of a small ITK
// program. It tests including header files and linking with ITK
// libraries.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
#include "itkImage.h"
#include <iostream>
int main()
{
typedef itk::Image< unsigned short, 3 > ImageType;
ImageType::Pointer image = ImageType::New();
std::cout << "ITK Hello World !" << std::endl;
return EXIT_SUCCESS;
}
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// This code instantiates a $3D$ image\footnote{Also known as a
// \emph{volume}.} whose pixels are represented with type \code{unsigned
// short}. The image is then constructed and assigned to a
// \doxygen{SmartPointer}. Although later in the text we will discuss
// \code{SmartPointer}s in detail, for now think of it as a handle on an
// instance of an object (see section \ref{sec:SmartPointers} for more
// information). The \doxygen{Image} class will be described in
// Section~\ref{sec:ImageSection}.
//
// Software Guide : EndLatex
{% set version = "4.13.2" %}
package:
name: libitk
version: "{{version}}"
source:
url: https://github.com/InsightSoftwareConsortium/ITK/archive/v{{version}}.tar.gz
sha256: 98c2fd826e1987d797521d83031fcaa328135daf6524f7823363d66ab288c545
build:
number: 0
requirements:
build:
- cmake >=3.3
- ninja
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- expat
- hdf5>=1.10.4,<1.10.5.0a0 # [not win]
- jpeg
- libtiff
- libpng
- zlib
run:
- expat
- hdf5>=1.10.4,<1.10.5.0a0 # [not win]
- jpeg
- libtiff
- libpng
- zlib
test:
requires:
- cmake
- {{ compiler("c") }}
- {{ compiler("cxx") }}
files:
- example
commands:
- test -d $PREFIX/include/ITK* # [not win]
- if not exist %LIBRARY_INC%\\ITK* exit 1 # [win]
- itkTestDriver -- echo "Runtime ITK OK"
- cmake -D "CMAKE_SYSTEM_PREFIX_PATH:FILEPATH=${PREFIX}" ./example # [not win]
- cmake --build . --config Release # [not win]
about:
home: http://www.itk.org
license: Apache 2.0
license_file: LICENSE
summary: Runtime libraries and header files for the Insight Toolkit for segmentation and registration.
extra:
recipe-maintainers:
- blowekamp
- bluescarni
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment