Closed wbangna closed 3 years ago
Hello @wbangna ,
I'm not sure if you want to discuss improvements for rhonabwy related to your description.
I don't usually use libraries outside of standard directories, but I can point out 2 other solutions that may work:
PKG_CONFIG_PATH
accordingly to where your pkg-config config files are installedSomething like that:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${SCRIPT_DIR}/orcania-inst/lib64/pkgconfig:${SCRIPT_DIR}/yder-inst/lib64/pkgconfig:${SCRIPT_DIR}/jansson-inst/lib/pkgconfig:${SCRIPT_DIR}/gnutls-inst/lib/pkgconfig:${SCRIPT_DIR}/zlib-inst/lib/pkgconfig
$ cd "${BUILD_DIR}"
$ cmake \
-DCMAKE_INSTALL_PREFIX="${INST_DIR}" \
-DCMAKE_BUILD_TYPE=Release \
-DDOWNLOAD_DEPENDENCIES=OFF \
-DBUILD_RNBYC=ON\
-DWITH_ULFIUS=OFF \
"${RHONABWY_SRC_DIR}"
Maybe something like that:
$ cd "${BUILD_DIR}"
$ cmake \
-DCMAKE_INSTALL_PREFIX="${INST_DIR}" \
-DCMAKE_BUILD_TYPE=Release \
-DDOWNLOAD_DEPENDENCIES=OFF \
-DBUILD_RNBYC=ON\
-DWITH_ULFIUS=OFF \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="${SCRIPT_DIR}/orcania-inst/include:${SCRIPT_DIR}/yder-inst/include:${SCRIPT_DIR}/jansson-inst/include:${SCRIPT_DIR}/gnutls-inst/include:${SCRIPT_DIR}/zlib-inst/include" \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="${SCRIPT_DIR}/orcania-inst/lib64:${SCRIPT_DIR}/yder-inst/lib64:${SCRIPT_DIR}/jansson-inst/lib:${SCRIPT_DIR}/gnutls-inst/lib:${SCRIPT_DIR}/zlib-inst/lib" \
"${RHONABWY_SRC_DIR}"
If you have suggestion on rhonabwy cmake script improvements though, I'm all ears.
Hello @babelouest
I just want to be able to build your library the way I described but I also am not very familiar with cmake. Therefore I reported the issue hoping it was just a minor bug in the CMakeLists.txt file. I expected that when getting cmake to find all libraries with the options PC_INCLUDEDIR and PC_LIBDIR, make would also be able to compile the library accordingly.
Getting familiar with cmake is on my todo list so perhaps in the near future I will be able to find a solution. By now the workaround described in my first message is ok for me.
Thanks for the precisions, although your method involves changing files generated by cmake, so I'm not at ease with it...
If you find a way to achieve your goal using environnement variables or cmake options but need some changes in rhonabwy to do so, let me know, so I can make the change.
Compiling rhonabwy with dependencies installed in non-standard directories does not work. The following script makes it possible to do so:
All dependencies are compiled and installed in the same directory as the script.