-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Long story short:
$ cmake .. -DJSONCPP_WITH_PKGCONFIG_SUPPORT=1
-- JsonCpp Version: 1.6.2
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/jsoncpp-1.6.2/_build
$ grep includedir= pkg-config/jsoncpp.pc
includedir=${prefix}/include
Correct so far. However, if I change INCLUDE_INSTALL_DIR
to another name:
$ cmake .. -DJSONCPP_WITH_PKGCONFIG_SUPPORT=1 -DINCLUDE_INSTALL_DIR=test
-- JsonCpp Version: 1.6.2
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/jsoncpp-1.6.2/_build
$ grep includedir= pkg-config/jsoncpp.pc
includedir=${prefix}//tmp/jsoncpp-1.6.2/_build/test
An absolute path with build directory is put there, after the prefix. And if I pass an absolute path:
$ cmake .. -DJSONCPP_WITH_PKGCONFIG_SUPPORT=1 -DINCLUDE_INSTALL_DIR=/usr/include/jsoncpp
-- JsonCpp Version: 1.6.2
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/jsoncpp-1.6.2/_build
$ grep includedir= pkg-config/jsoncpp.pc
includedir=${prefix}//usr/include/jsoncpp
Then the prefix is duplicated.
Metadata
Metadata
Assignees
Labels
No labels