Whoops, seems this is not a typo. Well, the failure is there anyway, so I'm not sure what the behaviour should be exactly. Errors I'm seeing:
failed to create symbolic link 'lib/libpng.pc': No such file or directory
failed to create symbolic link 'lib/libpng-config': No such file or directory
failed to create symbolic link 'lib/libpng.a': No such file or directory
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not 100% clear to me what is supposed to happen when "else()" contains an optional expression, but apparently it's supposed to be the same expression as in the corresponding "if()" and just serves as a comment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, I should add that the reason this is important is that XCode complains very loudly if the output of a build contains such error messages. I think it must detect the word "failed" or something, because the build does in fact succeed (although the symlinks are not created, obviously).
Last edit: Rolf Timmermans 2014-07-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please try with line 221 being "else()", without any comment.
That doesn't work. Getting the same errors. The problem is that a link is being made into "lib", but there is no lib directory in the build dir (I'm using out of source builds). There is also no lib directory in the source dir, though.
Last edit: Rolf Timmermans 2014-07-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes there is something wrong, but I think the line should
simply be "else()"
Whoops, seems this is not a typo. Well, the failure is there anyway, so I'm not sure what the behaviour should be exactly. Errors I'm seeing:
failed to create symbolic link 'lib/libpng.pc': No such file or directory
failed to create symbolic link 'lib/libpng-config': No such file or directory
failed to create symbolic link 'lib/libpng.a': No such file or directory
Yes, there seems to be no typo. See
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:if
or
man cmake; search for "if("
It's not 100% clear to me what is supposed to happen when "else()" contains an optional expression, but apparently it's supposed to be the same expression as in the corresponding "if()" and just serves as a comment.
Also, I should add that the reason this is important is that XCode complains very loudly if the output of a build contains such error messages. I think it must detect the word "failed" or something, because the build does in fact succeed (although the symlinks are not created, obviously).
Last edit: Rolf Timmermans 2014-07-29
Please try with line 221 being "else()", without any expression in the "()".
Last edit: Glenn Randers-Pehrson 2014-07-29
That doesn't work. Getting the same errors. The problem is that a link is being made into "lib", but there is no lib directory in the build dir (I'm using out of source builds). There is also no lib directory in the source dir, though.
Last edit: Rolf Timmermans 2014-07-29
OK. The makefiles and "configure" use "mkdir -p" so we need to do the equivalent here, I suppose.
CMake has "cmake -E make_directory" which is cross platform and can do that. So I guess somewhere there needs to be something like this?
${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/lib
Just after the
I added this line:
Seems to work for me on Ubuntu, but that doesn't prove anything
because it also works in libpng-1.6.13beta02 unmodified.
Fix has been checked in to the libpng16 branch of the libpng GIT repository. Please test it.
Last edit: Glenn Randers-Pehrson 2014-07-30
libpng-1.6.13beta03 has this bugfix. Please test it.
Works fine now, thanks!
Fixed in libpng-1.6.13.