The following issue has been SUBMITTED. ====================================================================== https://public.kitware.com/Bug/view.php?id=15746 ====================================================================== Reported By: Dan Kegel Assigned To: ====================================================================== Project: CMake Issue ID: 15746 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-09-15 15:20 EDT Last Modified: 2015-09-15 15:20 EDT ====================================================================== Summary: pkg_check_modules should document how to handle spaces in framework names Description: pc files don't often have spaces in values, but it does happen (especially on the Mac), and a little guidance would be helpful.
http://kegel.com/cmake/spaces-in-framework-names/ is a worked example of how to cope with framework names that contain spaces. The idea is: - the .pc file should use a backslash in front of each space in the name (quotes don't seem to work) - the CMakeLists.txt should use string(REPLACE...) to replace semicolons with spaces and/or single quote marks, as appropriate For instance: string(REPLACE "-framework;foo;bar" "-framework 'foo bar'" foo_LDFLAGS "${foo_LDFLAGS}") Steps to Reproduce: On a mac: $ tar -xzvf spaces-in-framework-names.tgz $ cd spaces-in-framework-names # comment out the string(REPLACE...) in CMakeLists.txt to demonstrate problem $ sh demo.sh ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-09-15 15:20 Dan Kegel New Issue 2015-09-15 15:20 Dan Kegel File Added: spaces-in-framework-names.tgz ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers