Fix engine build when png lib isn't available
authorunc0rr
Thu, 20 Jun 2013 10:10:05 +0400
changeset 9241 6f94d6434f94
parent 9239 aa4b84ab0a77
child 9243 d8f6a396d98e
Fix engine build when png lib isn't available
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Thu Jun 20 00:28:44 2013 +0400
+++ b/hedgewars/CMakeLists.txt	Thu Jun 20 10:10:05 2013 +0400
@@ -18,7 +18,6 @@
     uFloat.pas
     uConsts.pas
     LuaPas.pas
-    PNGh.pas
     uTypes.pas
     uUtils.pas
     uVariables.pas
@@ -140,6 +139,7 @@
 
 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
 if(PNG_FOUND)
+    list(APPEND engine_sources PNGh.pas)
     list(REMOVE_AT PNG_LIBRARIES 1) #removing the zlib library path
     get_filename_component(PNG_LIBRARY_DIR ${PNG_LIBRARIES} PATH)
     add_flag_append(CMAKE_Pascal_FLAGS -Fl${PNG_LIBRARY_DIR})