I've got a source tree with many src directories (lots of use of add_subdirectory), and
I would like to install all of them and be able to use find_package to include them into another project.
After getting mightly confused with install(EXPORT.... , .cmake and config.cmake files,
please could someone tell me the right way of approaching this.
Thanks
Related
OS: Windows
Requirement: to build https://github.com/jgaa/restc-cpp using cmake.
The above project needs openssl, zlib and boost.
All good with finding the first 2 but can't find boost libraries.
Have used
file (GLOB_RECURSE boostDirs LIST_DIRECTORIES true C:/path/to/boost/libs/*.lib)
to find all possible directories where the lib files may live.
INCLUDE_DIRECTORIES(${boostDirs})
doesn't help as
set(Boost_DEBUG 1)
reveals that
_boost_LIBRARY_SEARCH_DIRS_RELEASE = has a mind of its own and doesn't use the included directories.
Have looked high (google) and low (the docs), to no avail.
Anybody have the solution to my problem?
All suggestions/workarounds welcome. And thanks in advance!
My question is almost a direct extension of this one, which asks how to add BOOST to a Yocto SDK. (Adding Boost recipe to Yocto SDK)
I followed the answers to the above link and I can see that the full set of libraries have been compiled, but only a subset of these end up in the distribution. For example, I need certain of the "*-mt.so" libraries, but only some of the single-thread libraries are copied into the final rootfs archive.
Could someone please advise me on how to do this?
I am unfamiliar with Poky, so might have the wrong terminology - apologies!
Kind regards, Kevin
You can use oe-pkgdata-util to find out what you need if you aren't sure. In this case,
oe-pkgdata-util list-pkg-files -p boost
This will list the packages produced by boost recipe with files in them.
If you're looking for something specific, for this case, try something like:
oe-pkgdata-util find-path *-mt.so
Along with Kevins answer, you can always say which files need to be installed. This can be done in the recipe files ( for boost may be add a .bbapend file and write which files you want to install by specifying them in do_install += " ")
I just started teaching myself XLib, and I'm trying to figure out where everything is located. I've found the header files to be located at /opt/X11/include (I'm using MacOS if that's relevant), but I have no idea where I should tell gcc to look for the actual libraries. I know they're somewhere in /opt/X11/lib, but there are so many subdirectories I don't know where to look. Specifically, I'm trying to find the library file(s) associated with X11/Xlib.h. Help would be appreciated. Thanks.
On linux the library is libX11.so (it might be a link e.g. libX11.so -> libX11.so.6.3.0) and it is under the directory /usr/lib64.
Have no issues linking to system frameworks, but I can't ever seem to get CMake to find pre-built frameworks stored in a local directory. Tried various combinations of find_library and link_directories.
link_directories(/path/to/Framework)
find_library(THE_FRAMEWORK
NAMES TheFramework
HINT "/path/to/Framework"
REQUIRED)
target_link_libraries(${PROJECT_NAME} ${THE_FRAMEWORK})
I invariably end up with a NOT_FOUND error.
I believe the issue was that HINT needed to be HINTS
It seems that I am doing something wrong or the linker is not very good in xcode (I imagine is the first situation :) ) but I found that I need to manually add the OSBundleLibrary references on the plist.
The problem is that sometimes I don't know which bundles should I include, for example, I am building a kernel extension and I am using VFS, it compiles but when I try to load it into the kernel it complains that it can not resolve all the VFS functions.
I usually include "com.apple.kernel.bsd" but when I check samples of VFS I can see "com.apple.kpi.bsd", a bit confusing.
Can anyone share some light?
Thanks!
I found the solution, there is a reference link with all the extensions:
http://developer.apple.com/documentation/Darwin/Conceptual/KEXTConcept/KEXTConceptDependencies/kext_dependencies.html