Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Chameleon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
AGULLO Emmanuel
Chameleon
Commits
656001b6
Commit
656001b6
authored
Jan 30, 2015
by
PRUVOST Florent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a function to test in FxT cmake Find
parent
d92b4790
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
cmake_modules/morse/find/FindFXT.cmake
cmake_modules/morse/find/FindFXT.cmake
+32
-3
No files found.
cmake_modules/morse/find/FindFXT.cmake
View file @
656001b6
...
...
@@ -41,6 +41,9 @@
# (To distribute this file outside of Morse, substitute the full
# License text for the above reference.)
if
(
NOT FXT_FOUND
)
set
(
FXT_DIR
""
CACHE PATH
"Root directory of FXT library"
)
endif
()
# Optionally use pkg-config to detect include/library dirs (if pkg-config is available)
# -------------------------------------------------------------------------------------
...
...
@@ -197,6 +200,35 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
list
(
REMOVE_DUPLICATES FXT_LIBRARY_DIRS
)
endif
()
if
(
FXT_LIBRARIES
)
# check a function to validate the find
set
(
CMAKE_REQUIRED_INCLUDES
"
${
FXT_INCLUDE_DIRS
}
"
)
set
(
CMAKE_REQUIRED_LIBRARIES
"
${
FXT_LIBRARIES
}
"
)
set
(
CMAKE_REQUIRED_FLAGS
"-L
${
FXT_LIBRARY_DIRS
}
"
)
unset
(
FXT_WORKS CACHE
)
include
(
CheckFunctionExists
)
check_function_exists
(
fut_keychange FXT_WORKS
)
mark_as_advanced
(
FXT_WORKS
)
if
(
NOT FXT_WORKS
)
if
(
FXT_FIND_REQUIRED
)
if
(
NOT FXT_FIND_QUIETLY
)
message
(
STATUS
"Looking for fxt : test of fut_keychange with fxt library fails"
)
message
(
STATUS
"FXT_LIBRARIES:
${
CMAKE_REQUIRED_LIBRARIES
}
"
)
message
(
STATUS
"FXT_LIBRARY_DIRS:
${
CMAKE_REQUIRED_FLAGS
}
"
)
message
(
STATUS
"FXT_INCLUDE_DIRS:
${
CMAKE_REQUIRED_INCLUDES
}
"
)
message
(
STATUS
"Check in CMakeFiles/CMakeError.log to figure out why it fails"
)
message
(
STATUS
"Looking for fxt : set FXT_LIBRARIES to NOTFOUND"
)
endif
()
set
(
FXT_LIBRARIES
"FXT_LIBRARIES-NOTFOUND"
)
endif
()
endif
()
set
(
CMAKE_REQUIRED_INCLUDES
)
set
(
CMAKE_REQUIRED_FLAGS
)
set
(
CMAKE_REQUIRED_LIBRARIES
)
endif
(
FXT_LIBRARIES
)
endif
(
NOT FXT_FOUND OR NOT FXT_LIBRARIES
)
...
...
@@ -205,6 +237,3 @@ endif(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
FXT DEFAULT_MSG
FXT_LIBRARIES
)
#
# TODO: Add possibility to check for specific functions in the library
#
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