Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
67caf907
Commit
67caf907
authored
Sep 05, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reporting of missing components in FindLibcaf
parent
0dab8a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
31 deletions
+30
-31
cmake/FindLibcaf.cmake
cmake/FindLibcaf.cmake
+30
-31
No files found.
cmake/FindLibcaf.cmake
View file @
67caf907
...
@@ -47,10 +47,9 @@ foreach (comp ${Libcaf_FIND_COMPONENTS})
...
@@ -47,10 +47,9 @@ foreach (comp ${Libcaf_FIND_COMPONENTS})
../../
${
HDRHINT
}
../../
${
HDRHINT
}
../../../
${
HDRHINT
}
)
../../../
${
HDRHINT
}
)
mark_as_advanced
(
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
)
mark_as_advanced
(
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
)
if
(
"
${
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}}
"
STREQUAL
"LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
-NOTFOUND"
)
if
(
NOT
"
${
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}}
"
STREQUAL
"LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
-NOTFOUND"
)
# exit on first error
# mark as found (set back to false in case library cannot be found)
break
()
set
(
Libcaf_
${
comp
}
_FOUND true
)
else
()
# add to LIBCAF_INCLUDE_DIRS only if path isn't already set
# add to LIBCAF_INCLUDE_DIRS only if path isn't already set
set
(
duplicate false
)
set
(
duplicate false
)
foreach
(
p
${
LIBCAF_INCLUDE_DIRS
}
)
foreach
(
p
${
LIBCAF_INCLUDE_DIRS
}
)
...
@@ -61,39 +60,39 @@ foreach (comp ${Libcaf_FIND_COMPONENTS})
...
@@ -61,39 +60,39 @@ foreach (comp ${Libcaf_FIND_COMPONENTS})
if
(
NOT duplicate
)
if
(
NOT duplicate
)
set
(
LIBCAF_INCLUDE_DIRS
${
LIBCAF_INCLUDE_DIRS
}
${
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}}
)
set
(
LIBCAF_INCLUDE_DIRS
${
LIBCAF_INCLUDE_DIRS
}
${
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}}
)
endif
()
endif
()
endif
()
# look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs
# look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs
# skip probe_event as it is header only
find_library
(
LIBCAF_LIBRARY_
${
UPPERCOMP
}
if
(
NOT
${
comp
}
STREQUAL
"probe_event"
)
NAMES
find_library
(
LIBCAF_LIBRARY_
${
UPPERCOMP
}
"caf_
${
comp
}
"
NAMES
HINTS
"caf_
${
comp
}
"
${
LIBCAF_ROOT_DIR
}
/lib
HINTS
/usr/lib
${
LIBCAF_ROOT_DIR
}
/lib
/usr/local/lib
/usr/lib
/opt/local/lib
/usr/local/lib
/sw/lib
/opt/local/lib
${
CMAKE_INSTALL_PREFIX
}
/lib
/sw/lib
../actor-framework/build/lib
${
CMAKE_INSTALL_PREFIX
}
/lib
../../actor-framework/build/lib
../actor-framework/build/lib
../../../actor-framework/build/lib
)
../../actor-framework/build/lib
mark_as_advanced
(
LIBCAF_LIBRARY_
${
UPPERCOMP
}
)
../../../actor-framework/build/lib
)
# skip probe_event as it is header only
mark_as_advanced
(
LIBCAF_LIBRARY_
${
UPPERCOMP
}
)
if
(
NOT
${
comp
}
STREQUAL
"probe_event"
)
if
(
"
${
LIBCAF_LIBRARY_
${
UPPERCOMP
}}
"
STREQUAL
"LIBCAF_LIBRARY-NOTFOUND"
)
if
(
"
${
LIBCAF_LIBRARY_
${
UPPERCOMP
}}
"
STREQUAL
"LIBCAF_LIBRARY-NOTFOUND"
)
set
(
Libcaf_
${
comp
}
_FOUND false
)
# exit on first error
else
()
break
()
set
(
LIBCAF_LIBRARIES
${
LIBCAF_LIBRARIES
}
${
LIBCAF_LIBRARY_
${
UPPERCOMP
}}
)
else
()
endif
()
set
(
LIBCAF_LIBRARIES
${
LIBCAF_LIBRARIES
}
${
LIBCAF_LIBRARY_
${
UPPERCOMP
}}
)
endif
()
endif
()
endif
()
endif
()
endforeach
()
endforeach
()
#
final steps to tell CMake we're done
#
let CMake check whether all requested components have been found
include
(
FindPackageHandleStandardArgs
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Libcaf
find_package_handle_standard_args
(
Libcaf
DEFAULT_MSG
FOUND_VAR LIBCAF_FOUND
LIBCAF_LIBRARIES
REQUIRED_VARS LIBCAF_LIBRARIES LIBCAF_INCLUDE_DIRS
LIBCAF_INCLUDE_DIRS
)
HANDLE_COMPONENTS
)
# final step to tell CMake we're done
mark_as_advanced
(
LIBCAF_ROOT_DIR
mark_as_advanced
(
LIBCAF_ROOT_DIR
LIBCAF_LIBRARIES
LIBCAF_LIBRARIES
LIBCAF_INCLUDE_DIRS
)
LIBCAF_INCLUDE_DIRS
)
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