[CMake] CMake uses semi-colon as path separator on Linux

Pawel Veselov pawel.veselov at gmail.com
Fri Apr 14 00:05:05 EDT 2017


Hello.

I really can't understand what's going on. Trying to compile my project
for android, setting all kinds of things to get it done. I've tried 3.8.0,
3.7.2 and 3.6.2, with the same result. The below extracts are from running
3.6.2

Running with --debug and --trace, I see:

/usr/share/cmake/Modules/FindPkgConfig.cmake(91):
_pkgconfig_set(JSONC_CFLAGS ${_pkgconfig_invoke_result} )
/usr/share/cmake/Modules/FindPkgConfig.cmake(64):  set(JSONC_CFLAGS
-I/tmp/arm-23/include/json-c;-I/tmp/arm-23/include CACHE INTERNAL  )

I ran strace, and I can see pkg-config returning paths normally, just spaces.

Running make on the generated makefiles:

/tmp/arm-23/bin/arm-linux-androideabi-gcc    -g -ggdb -O0 --std=c99
-isystem/home/vps/ws/EF/DMClient/android_src/http-parser
-isystem/usr/include
-isystem/home/vps/ws/EF/DMClient/android_src/wslay/lib/includes
-I/tmp/arm-23/include/json-c;-I/tmp/arm-23/include -isystem
/tmp/arm-23/include -isystem /tmp/arm-23/include/libxml2   -o
CMakeFiles/dmclient.dir/config.c.o   -c
/home/vps/ws/EF/DMClient/config.c

The semicolons are in the ./CMakeFiles/node_editor.dir/flags.make

The CMakeLists.txt has this line:
pkg_check_modules(JSONC REQUIRED json-c openssl)

At this point, I'm running CMake without any fancy command, the compiler
location and such are derived from environment variables.

I tried using the NDK flags (with 3.8, and using toolchain), but then
realized this reproduces even without them (and on 3.6)

Any idea what drags in those semicolons?

Thank you.


More information about the CMake mailing list