equal
deleted
inserted
replaced
164 message(FATAL_ERROR "No FreePascal compiler found!") |
164 message(FATAL_ERROR "No FreePascal compiler found!") |
165 endif() |
165 endif() |
166 |
166 |
167 |
167 |
168 #DEPENDECIES AND EXECUTABLES SECTION |
168 #DEPENDECIES AND EXECUTABLES SECTION |
169 find_package(PNG) |
169 if(NOT NOPNG) |
170 if(${PNG_FOUND}) |
170 find_package(PNG) |
171 message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})") |
171 if(${PNG_FOUND}) |
172 set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags}) |
172 message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})") |
173 if(APPLE) # need to explictly link with the static lib |
173 set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags}) |
174 string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}") |
174 if(APPLE) # need to explictly link with the static lib |
175 set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags}) |
175 string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}") |
176 endif() |
176 set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags}) |
177 else() |
177 endif() |
178 message(STATUS "PNG library not found, switching to screenshots in BMP format") |
178 else() |
|
179 message(STATUS "PNG library not found, switching to screenshots in BMP format") |
|
180 endif() |
179 endif() |
181 endif() |
180 |
182 |
181 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) |
183 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) |
182 |
184 |
183 |
185 |