Permalink
Browse files

CMAKE: Add ZLIB detection

  • Loading branch information...
szekerest committed Mar 29, 2013
1 parent 49b6bdc commit 1c2686500aecc07b2a55c6455ad6df7b75fd4642
Showing with 10 additions and 0 deletions.
  1. +10 −0 CMakeLists.txt
View
@@ -202,6 +202,15 @@ target_link_libraries(shp2img ${MAPSERVER_LIBMAPSERVER})
find_package(ZLIB)
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIR})
ms_link_libraries( ${ZLIB_LIBRARY})
set(USE_ZLIB 1)
else(ZLIB_FOUND)
report_mandatory_not_found(ZLIB)
endif(ZLIB_FOUND)
find_package(PNG)
if(PNG_FOUND)
include_directories(${PNG_INCLUDE_DIR})
@@ -649,6 +658,7 @@ endmacro()
message(STATUS "* Summary of configured options for this build")
message(STATUS " * Mandatory components")
message(STATUS " * zlib: ${ZLIB_LIBRARY}")
message(STATUS " * png: ${PNG_LIBRARY}")
message(STATUS " * jpeg: ${JPEG_LIBRARY}")
message(STATUS " * freetype: ${FREETYPE_LIBRARY}")

7 comments on commit 1c26865

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 29, 2013

Member

@szekerest as we don't use zlib directly (correct me if I'm wrong) we shouldn't be doing this check. FindPNG already does the search for Zlib as that's where it's needed. If for windows you need to explicitely specify the zlib library, using ms_link_libraries(${PNG_LIBRARIES}) instead of PNG_LIBRARY should be sufficient.

Member

tbonfort replied Mar 29, 2013

@szekerest as we don't use zlib directly (correct me if I'm wrong) we shouldn't be doing this check. FindPNG already does the search for Zlib as that's where it's needed. If for windows you need to explicitely specify the zlib library, using ms_link_libraries(${PNG_LIBRARIES}) instead of PNG_LIBRARY should be sufficient.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Mar 29, 2013

Member

@tbonfort That's true indeed. I'll revert this change as soon as committing the c# related additions. How about regex in this context? The windows makefile compiles regex directly in mapserver. It doesn't seem to be the case with this cmake configuration.

Member

szekerest replied Mar 29, 2013

@tbonfort That's true indeed. I'll revert this change as soon as committing the c# related additions. How about regex in this context? The windows makefile compiles regex directly in mapserver. It doesn't seem to be the case with this cmake configuration.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 29, 2013

Member

@szekerest for the regex part, you can have a look at my cmake-win32 branch. I have not included it as I have not looked into the licensing issues if we happened to include the regex.c/.h files into mapserver.
Ping me if you need any help with the C# mapscript part.

Member

tbonfort replied Mar 29, 2013

@szekerest for the regex part, you can have a look at my cmake-win32 branch. I have not included it as I have not looked into the licensing issues if we happened to include the regex.c/.h files into mapserver.
Ping me if you need any help with the C# mapscript part.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Mar 29, 2013

Member

@tbonfort Not sure about the licensing issue, though I think if we would like to include it this way it would also be reasonable to commit regex part in mapserver too. We could also compile regex into a .lib which could be passed to the linker as an external lib.

Member

szekerest replied Mar 29, 2013

@tbonfort Not sure about the licensing issue, though I think if we would like to include it this way it would also be reasonable to commit regex part in mapserver too. We could also compile regex into a .lib which could be passed to the linker as an external lib.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 29, 2013

Member

It's going to be problematic to pull in lgpl code into our codebase, so the external library and a win32 only dependency on it would seem better to me.

Member

tbonfort replied Mar 29, 2013

It's going to be problematic to pull in lgpl code into our codebase, so the external library and a win32 only dependency on it would seem better to me.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Mar 29, 2013

Member

@tbonfort And how regex is incorporated in the linux builds BTW?

Member

szekerest replied Mar 29, 2013

@tbonfort And how regex is incorporated in the linux builds BTW?

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 29, 2013

Member

it's in libc, just like any sane operating system should be doing :)

Member

tbonfort replied Mar 29, 2013

it's in libc, just like any sane operating system should be doing :)

Please sign in to comment.