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
e0bb78cb
Commit
e0bb78cb
authored
Jul 19, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add components-aware FindLibcaf script for CMake
parent
a147db9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
cmake/FindLibcaf.cmake
cmake/FindLibcaf.cmake
+65
-0
No files found.
cmake/FindLibcaf.cmake
0 → 100644
View file @
e0bb78cb
# - Try to find user-defined components of libcaf
# Once done this will define
#
# LIBCAF_INCLUDE_DIRS - include directories for all found components
# LIBCAF_LIBRARY_$C - library for component $C
# LIBCAF_FOUND - system has libcaf
# LIBCAF_INCLUDE_DIRS - libcaf include dir
# LIBCAF_LIBRARIES - link againgst libcaf
# LIBCAF_VERSION - version in {major}.{minor}.{patch} format
foreach
(
comp
${
Libcaf_FIND_COMPONENTS
}
)
string
(
TOUPPER
"
${
comp
}
"
UPPERCOMP
)
if
(
"
${
comp
}
"
STREQUAL
"core"
)
set
(
HDRNAME
"caf/all.hpp"
)
else
()
set
(
HDRNAME
"caf/
${
comp
}
/all.hpp"
)
endif
()
message
(
STATUS
"Search for libcaf_
${
comp
}
and
${
HDRNAME
}
"
)
set
(
HDRHINT
"actor-framework/libcaf_
${
comp
}
"
)
unset
(
LIBCAF_INCLUDE_DIR
)
find_path
(
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
NAMES
${
HDRNAME
}
HINTS
${
LIBCAF_ROOT_DIR
}
/include
/usr/include
/usr/local/include
/opt/local/include
/sw/include
${
CMAKE_INSTALL_PREFIX
}
/include
../
${
HDRHINT
}
../../
${
HDRHINT
}
../../../
${
HDRHINT
}
)
mark_as_advanced
(
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
)
if
(
"
${
LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}}
"
STREQUAL
"LIBCAF_INCLUDE_DIR_
${
UPPERCOMP
}
-NOTFOUND"
)
break
()
else
()
message
(
STATUS
"Found headers for
${
HDRNAME
}
"
)
endif
()
find_library
(
LIBCAF_LIBRARY_
${
UPPERCOMP
}
NAMES
"caf_
${
comp
}
"
HINTS
${
LIBCAF_ROOT_DIR
}
/lib
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
${
CMAKE_INSTALL_PREFIX
}
/lib
../actor-framework/build/lib
../../actor-framework/build/lib
../../../actor-framework/build/lib
)
mark_as_advanced
(
LIBCAF_LIBRARY_
${
UPPERCOMP
}
)
if
(
"
${
LIBCAF_LIBRARY_
${
UPPERCOMP
}}
"
STREQUAL
"LIBCAF_LIBRARY-NOTFOUND"
)
break
()
else
()
message
(
STATUS
"Found lib:
${
LIBCAF_LIBRARY_
${
UPPERCOMP
}}
"
)
endif
()
endforeach
()
include
(
FindPackageHandleStandardArgs
)
mark_as_advanced
(
LIBCAF_ROOT_DIR
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