Thanks Eike, that helps, but I can't understand why it is necessary?
Within the trace message output there was no semicolon, see below. My first try was this: message(EXTRA_LIBS=${EXTRA_LIBS}) # => EXTRA_LIBS=/usr/lib/libpthread.dylib/usr/lib/libcrypto.dylib # OK but no spaces message(EXTRA_LIBS="${EXTRA_LIBS}") # >>>>>>>> EXTRA_LIBS=/usr/lib/libpthread.dylib;/usr/lib/libcrypto.dylib # fault! with ';' Than I changed my code and got this output: On 28.06.2013, at 19:06, Rolf Eike Beer wrote: >> # .... >> # trace >> message( STATUS SNMP_PP_LIBS="${LIBS}") >> message( STATUS SNMP_PP_LDFLAGS="${LINKFLAGS}") >> # >> # -- SNMP_PP_LIBS="-lpthread -lcrypto " <<<<<<<<<<<<<<<<< OK, with >> spaces and no ';' >> # -- SNMP_PP_LDFLAGS="-L/usr/lib " >> # ... >> ## configure_file(snmp++-3.pc.in snmp++-3.pc @ONLY) >> # -- Generating snmp++-3.pc file for pkg-config ... >> # >> # Libs.private: @LIBS@ @LINKFLAGS@ >> # ... expands to: >> # Libs.private: -lpthread ;-lcrypto -L/usr/lib >> # ^ >> # How can I prevent this? > > string(REPLACE ";" " " LIBS "${LIBS}") > > Eike > -- Is there a better way to create a pkg-config file? IMHO, It would be nice if the FindPkgConfig.cmake module could create pc file too. something like: pkg_create_module(<PREFIX> <PATH> [QUIET] <MODULE> ) it should be the reversed function of: pkg_search_module (LIBXML libxml2) Is this possible? //Regards Claus
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake