[yocto] Using the SDK and CMAKE GNUInstallDirs for multilib target
Måns Zigher
mans.zigher at gmail.com
Wed May 29 02:12:59 PDT 2019
Hi,
I found in cmake.bbclass
cmake \
${OECMAKE_GENERATOR_ARGS} \
$oecmake_sitefile \
${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'),
d.getVar('prefix'))} \
-DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'),
d.getVar('prefix'))} \
-DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir'),
d.getVar('prefix'))} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir'),
d. getVar('prefix'))} \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
-DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'),
d.getVar('prefix'))} \
-DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir'),
d.getVar('prefix'))} \
-DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir'),
d.getVar('prefix'))} \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
${EXTRA_OECMAKE} \
-Wno-dev
so it looks all CMAKE_INSTALL paths are actually managed by cmake class.
/Måns
Den tis 28 maj 2019 kl 18:47 skrev Måns Zigher <mans.zigher at gmail.com>:
>
> Hi,
>
> Not really a Yocto question but I am trying to build an application
> using our SDK. We are using CMake to build and are using
> GNUInstallDIrs for managing our install paths. I thought
> GNUInstallDirs should have the detected that the SDK was a multilib
> which it dose in regards to finding packages since it will look for
> libraries under /usr/lib64 but when looking into GNUInstallDirs it
> will explicitly not try and detect if CMAKE_INSTALL_LIBDIR should be
> lib or lib64 when CMAKE_CROSSCOMPILING is set which it is when using
> the SDK. When building the same application in our image build it
> works as expected and GNUInstallDirs will detect that it is a multilib
> dir and install it under /usr/lib64. Could anyone point me to how we
> manage this in poky/OE so I could potentially copy that to our SDK
> build?
>
> BR
> Måns Zigher
More information about the yocto
mailing list