Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
9d58024b
Commit
9d58024b
authored
Apr 02, 2013
by
Stefan Philips
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] CMake doesn't break when OpenIGTLink library isn't found.
parent
e2c80b30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
src/modules/openIGTLink/CMakeLists.txt
src/modules/openIGTLink/CMakeLists.txt
+22
-21
No files found.
src/modules/openIGTLink/CMakeLists.txt
View file @
9d58024b
...
...
@@ -34,24 +34,25 @@ GET_FILENAME_COMPONENT( MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# 1: FindPackage( LibYouNeed )
Find_Package
(
OpenIGTLink
)
# 2: INCLUDE_DIRECTORIES( ${LIBYOUNEED_INCLUDE_DIR} )
INCLUDE_DIRECTORIES
(
${
OpenIGTLink_INCLUDE_DIRS
}
)
# 3: LINK_DIRECTORIES( ${LIBYOUNEED_LIBRARY_DIRS} )
LINK_DIRECTORIES
(
${
OpenIGTLink_LIBRARY_DIRS
}
)
# 4: Add ${LIBYOUNEED_LIBRARY} as _MODULE_DEPENDENCIES parameter to SETUP_MODULE
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Setup for compilation
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Let this function do the job. It sets up tests and copies shaders automatically. It additionally configures the stylecheck mechanism for this
# module.
SETUP_MODULE
(
${
MODULE_NAME
}
# name of the module
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
# where to find the source ${CMAKE_CURRENT_SOURCE_DIR} is a good idea here mostly
${
OpenIGTLink_LIBRARIES
}
# does your module need additional libs to compile?
""
# do you want to exclude files from stylechecking? (externals for example)
)
Find_Package
(
OpenIGTLink QUIET
)
IF
(
OpenIGTLink_FOUND
)
# 2: INCLUDE_DIRECTORIES( ${LIBYOUNEED_INCLUDE_DIR} )
INCLUDE_DIRECTORIES
(
${
OpenIGTLink_INCLUDE_DIRS
}
)
# 3: LINK_DIRECTORIES( ${LIBYOUNEED_LIBRARY_DIRS} )
LINK_DIRECTORIES
(
${
OpenIGTLink_LIBRARY_DIRS
}
)
# 4: Add ${LIBYOUNEED_LIBRARY} as _MODULE_DEPENDENCIES parameter to SETUP_MODULE
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Setup for compilation
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Let this function do the job. It sets up tests and copies shaders automatically. It additionally configures the stylecheck mechanism for this
# module.
SETUP_MODULE
(
${
MODULE_NAME
}
# name of the module
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
# where to find the source ${CMAKE_CURRENT_SOURCE_DIR} is a good idea here mostly
${
OpenIGTLink_LIBRARIES
}
# does your module need additional libs to compile?
""
# do you want to exclude files from stylechecking? (externals for example)
)
ENDIF
(
OpenIGTLink_FOUND
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment