[CMake] Generating libtool file with CMake
Mathieu Tarral
mathieu.tarral at protonmail.com
Fri Nov 9 19:41:31 EST 2018
Hi !
I'm trying to port the LibVMI project from autotools to CMake:
https://github.com/libvmi/libvmi/pull/674
One of the problems I have is to generate a libtool libvmi.la file, like autotools is already doing.
So far I have found this module on CMake wiki: https://gitlab.kitware.com/cmake/community/wikis/contrib/macros/LibtoolFile
But it seems a bit old.
CMake Error at cmake/modules/Libtool.cmake:9 (GET_TARGET_PROPERTY):
The LOCATION property may not be read from target "vmi_shared". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.
Call Stack (most recent call first):
libvmi/CMakeLists.txt:127 (create_libtool_file)
I found an updated version of this script on the GNU Radio project:
https://github.com/gnuradio/gnuradio/blob/master/cmake/Modules/CMakeMacroLibtoolFile.cmake
But again, another error:
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE:$_target>
Expression syntax not recognized.
-> Can the CMake community help me a bit to generate
this libtool file on a recent CMake release ?
Thanks !
--
Mathieu Tarral
Sent with ProtonMail Secure Email.
More information about the CMake
mailing list