Claus Klein wrote: > Hi > > I want to create a pkg-config.pc file with cmake. > > claus-kleins-macbook-pro:build clausklein$ pkg-config --libs QtOpenGL > -L/opt/local/lib -lQtOpenGL -lQtGui -lQtCore > > claus-kleins-macbook-pro:build clausklein$ cmake --version > cmake version 2.8.10.2 > > > This are my input values: > ## message(EXTRA_LIBS=${EXTRA_LIBS}) # > EXTRA_LIBS=/usr/lib/libpthread.dylib/usr/lib/libcrypto.dylib ## > message(EXTRA_LIBS="${EXTRA_LIBS}") # > EXTRA_LIBS=/usr/lib/libpthread.dylib;/usr/lib/libcrypto.dylib > > And this is a sniped of my CMakeLists.txt file: > > # create LIBS and LDFLAGS list > foreach(_lib ${EXTRA_LIBS}) > get_filename_component(_lib_name ${_lib} NAME_WE) > string(REGEX REPLACE "^lib" "" _name ${_lib_name}) > list(APPEND LIBS "-l${_name} ") > get_filename_component(_lib_dir ${_lib} PATH) > list(APPEND LINKFLAGS "-L${_lib_dir} ") > endforeach() > list(REMOVE_DUPLICATES LIBS ) > list(REMOVE_DUPLICATES LINKFLAGS ) > > # trace > message( STATUS SNMP_PP_LIBS="${LIBS}") > message( STATUS SNMP_PP_LDFLAGS="${LINKFLAGS}") > # > # -- SNMP_PP_LIBS="-lpthread -lcrypto " > # -- 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 --
signature.asc
Description: This is a digitally signed message part.
-- 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