MantisBT - CMake
View Issue Details
0015746CMakeCMakepublic2015-09-15 15:202016-06-10 14:31
Dan Kegel 
Kitware Robot 
normalminoralways
closedmoved 
Apple Mac
CMake 3.3.1 
 
0015746: pkg_check_modules should document how to handle spaces in framework names
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}")
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
No tags attached.
tgz spaces-in-framework-names.tgz (1,401) 2015-09-15 15:20
https://public.kitware.com/Bug/file/5529/spaces-in-framework-names.tgz
Issue History
2015-09-15 15:20Dan KegelNew Issue
2015-09-15 15:20Dan KegelFile Added: spaces-in-framework-names.tgz
2016-06-10 14:29Kitware RobotNote Added: 0042840
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042840)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.