Skip to content

Commit

Permalink
Merge pull request #25 from KitwareMedical/interson-merge
Browse files Browse the repository at this point in the history
Interson merge
  • Loading branch information
brad-t-moore authored Oct 29, 2021
2 parents 4f7318e + 0294b02 commit c82d81f
Show file tree
Hide file tree
Showing 31 changed files with 3,886 additions and 1 deletion.
122 changes: 122 additions & 0 deletions Interson/IntersonArraySDKCxx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
##############################################################################
#
# Library: IntersonArraySDK
#
# Copyright Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# All rights reserved.
#
# 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
#
# 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.
#
##############################################################################

cmake_minimum_required( VERSION 3.5 )

project( IntersonArraySDKCxx )

# CMake modules
include( CMakePackageConfigHelpers )
include( CTest )

# Options
option( BUILD_APPLICATIONS "Build applications" OFF )
option( BUILD_SERVERS "Build OpenIGTLink Servers" OFF)

# External dependencies
find_path( IntersonArraySDK_DIR
NAMES Libraries/IntersonArray.dll
PATHS C:/IntersonArraySDK
)
if( NOT IntersonArraySDK_DIR )
message( FATAL_ERROR "Please specify the path to the IntersonArraySDK"
" in IntersonArraySDK_DIR" )
endif()
set( IntersonArraySDK_LIBRARY "${IntersonArraySDK_DIR}/IntersonArray.dll" )
if( NOT EXISTS ${IntersonArraySDK_LIBRARY} )
message( FATAL_ERROR "Interson library is missing [${IntersonArraySDK_LIBRARY}]" )
endif()

# Install relative directories
set( INSTALL_LIB_DIR lib )
set( INSTALL_BIN_DIR bin )
set( INSTALL_INCLUDE_DIR include )
set( INSTALL_CMAKE_DIR cmake )

# Output directories
if( NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${IntersonArraySDKCxx_BINARY_DIR}/${INSTALL_BIN_DIR} )
endif()
if( NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${IntersonArraySDKCxx_BINARY_DIR}/${INSTALL_LIB_DIR} )
endif()
if( NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${IntersonArraySDKCxx_BINARY_DIR}/${INSTALL_LIB_DIR} )
endif()

# Add subdirectories
add_subdirectory( include )
add_subdirectory( src )
if( BUILD_TESTING )
add_subdirectory( test )
endif()
if( BUILD_APPLICATIONS )
add_subdirectory( app )
endif()

if( BUILD_SERVERS )
add_subdirectory( openigtlink )
endif()

# Install Interson libraries
install( FILES ${IntersonArraySDK_LIBRARY}
DESTINATION ${INSTALL_BIN_DIR} COMPONENT Runtime
)

# Configure 'IntersonArraySDKCxxConfig.cmake' for a build tree
set(CONFIG_DIR_CONFIG ${PROJECT_BINARY_DIR})
set(intersonArraySDKCxx_config ${PROJECT_BINARY_DIR}/IntersonArraySDKCxxConfig.cmake)
configure_package_config_file(
IntersonArraySDKCxxConfig.cmake.in
${intersonArraySDKCxx_config}
INSTALL_DESTINATION ${PROJECT_BINARY_DIR}
PATH_VARS CONFIG_DIR_CONFIG
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)

# Configure 'IntersonArraySDKCxxConfig.cmake' for an install tree
set(CONFIG_DIR_CONFIG ${INSTALL_CMAKE_DIR})
set( intersonArraySDKCxx_install_config ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/IntersonArraySDKCxxConfig.cmake )
configure_package_config_file(
IntersonArraySDKCxxConfig.cmake.in
${intersonArraySDKCxx_install_config}
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}
PATH_VARS CONFIG_DIR_CONFIG
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
install(
FILES ${intersonArraySDKCxx_install_config}
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
)

# Configure 'IntersonArraySDKCxxTargets.cmake'
export( TARGETS IntersonArrayCxx
FILE ${PROJECT_BINARY_DIR}/IntersonArraySDKCxxTargets.cmake
)

# Install 'IntersonArraySDKCxxTargets.cmake' and 'IntersonArraySDKCxxConfig.cmake'
install( EXPORT IntersonArraySDKCxxTargets
FILE IntersonArraySDKCxxTargets.cmake
DESTINATION ${INSTALL_CMAKE_DIR}
COMPONENT Development
)
41 changes: 41 additions & 0 deletions Interson/IntersonArraySDKCxx/IntersonArraySDKCxxConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
##############################################################################
#
# Library: IntersonArraySDK
#
# Copyright Kitware Inc. 28 Corporate Drive,
# Clifton Park, NY, 12065, USA.
#
# All rights reserved.
#
# 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
#
# 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.
#
##############################################################################

# Config file for the IntersonArraySDKCxx library wrapper.
#
# It defines the following variables:
# IntersonArraySDKCxx_LIBRARIES - libraries to link against
# IntersonArraySDK_DIR - Path to the IntersonArraySDK used to
# build this library.

@PACKAGE_INIT@

set_and_check( IntersonArraySDKCxx_TARGETS "@PACKAGE_CONFIG_DIR_CONFIG@/IntersonArraySDKCxxTargets.cmake" )

if( NOT IntersonArraySDKCxx_TARGETS_IMPORTED )
set( IntersonArraySDKCxx_TARGETS_IMPORTED 1 )
include( ${IntersonArraySDKCxx_TARGETS} )
endif()

set( IntersonArraySDKCxx_LIBRARIES IntersonArrayCxx )
set( IntersonArraySDK_DIR "@IntersonArraySDK_DIR@" )
File renamed without changes.
12 changes: 12 additions & 0 deletions Interson/IntersonArraySDKCxx/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
IntersonArraySDKCxx
===================

C++ Wrapper for the C# SDK for Interson's Linear Array Probe
-------------------------------------------------------------

Dependencies
------------

- CMake
- Interson Array SDK
- Visual Studio, VC x86 Compiler >= 2015
Loading

0 comments on commit c82d81f

Please sign in to comment.