-
Notifications
You must be signed in to change notification settings - Fork 3
/
UseNiftyLink.cmake.in
39 lines (33 loc) · 1.72 KB
/
UseNiftyLink.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#/*================================================================================
#
# NiftyLink: A software library to facilitate communication over OpenIGTLink.
#
# Copyright (c) University College London (UCL). All rights reserved.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.
#
# See LICENSE.txt in the top level directory for details.
#
#=================================================================================*/
#
# This file sets up include directories, link directories, and
# compiler settings for a project to compile against NiftyLink.
# It should not be included directly, but rather through the
# NiftyLink_USE_FILE setting obtained from NiftyLinkConfig.cmake.
#
IF(NiftyLink_BUILD_SETTINGS_FILE AND NOT SKIP_NiftyLink_BUILD_SETTINGS_FILE)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeImportBuildSettings.cmake)
CMAKE_IMPORT_BUILD_SETTINGS(${NiftyLink_BUILD_SETTINGS_FILE})
ENDIF(NiftyLink_BUILD_SETTINGS_FILE AND NOT SKIP_NiftyLink_BUILD_SETTINGS_FILE)
# Add compiler flags needed to use NiftyLink.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NiftyLink_REQUIRED_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NiftyLink_REQUIRED_CXX_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${NiftyLink_REQUIRED_LINK_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${NiftyLink_REQUIRED_LINK_FLAGS}")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${NiftyLink_REQUIRED_LINK_FLAGS}")
# Add include directories needed to use NiftyLink.
INCLUDE_DIRECTORIES(BEFORE ${NiftyLink_INCLUDE_DIRS} )
# Add link directories needed to use NiftyLink.
LINK_DIRECTORIES(${NiftyLink_LIBRARY_DIRS})