Hello Matthew and zyx,
Sorry for the delay, I was called on another project until now.
If I've used $(EXTERN_DEV), it's because it's the way VS projects use
macros.
I've tried many solutions like :
set( EXTERN_DEV "$ENV{EXTERN_DEV}")
and use ${EXTERN_DEV} in the definitions of paths.
This case throws messages about policy CMP0019.
Even, if I set this policy OLD, variables are evaluated but prepended
with the project path resulting as :
h:/src/podofo0.9.5/k:\extern_dev/zlib.1.2.11/include
So it doesn't work...
I found that CMake handles differently paths in INCLUDE_DIRECTORY and
Path to files like libraries
* Paths to libraries are left untouched
* Include directories that are absolute paths are left untouched and
others (including those that begin with variables) are handled as
relative paths.
I've found a way to handle this situation....
* I've created a symbolic link in the podofo root directory that
refers EXTERN_DEV (mklink /d extern_dev %EXTERN_DEV%)
* I've changed $(EXTERN_DEV) to extern_dev in each directory path to
includes.
* I've left $(EXTERN_DEV) in library paths. Link step fails if they
are changed...
* For install directory, $ENV{EXTERN_DEV}/podofo works....
It's a bit complicated but works... In the case of moving the EXTERN_DEV
directory elsewhere, I've just have to modifiy my environment variable
and the windows symbolic link.
I've just to correct compilation errors in podofosign on Windows.... I
don't understand why Linux doesn't have the same problem...
Thank you to all for your help.
Kind regards,
Patrice.
zyx a écrit :
On 13.7.2018 at 10:48 Patrice Guérin wrote:
ZLIB_INCLUDE_DIR=$(EXTERN_DEV)/zlib/1.2.11/include
Hi,
while Linux shell uses '$' to mark a variable for expansion, Windows
uses '%' instead. If you've the cmake command part of some .bat file,
then something like:
cmake -G "..." -DZLIB_INCLUDE_DIR=%EXTERN_DEV%/zlib/1.2.11/include ...
should do the trick. I mean, if you want the shell (command line) to
expand the variable.
Bye,
zyx
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users