equal
deleted
inserted
replaced
118 else(${BUILD_ENGINE_LIBRARY}) |
118 else(${BUILD_ENGINE_LIBRARY}) |
119 set(destination_dir ${target_binary_install_dir}) |
119 set(destination_dir ${target_binary_install_dir}) |
120 endif(${BUILD_ENGINE_LIBRARY}) |
120 endif(${BUILD_ENGINE_LIBRARY}) |
121 |
121 |
122 |
122 |
123 find_package(FreePascal REQUIRED) |
123 include(${CMAKE_MODULE_PATH}/utils.cmake) |
|
124 |
|
125 find_package_or_fail(FreePascal) |
|
126 |
124 #when cmake-2.6 support is dropped, this ought to be inside FindFreePascal.cmake |
127 #when cmake-2.6 support is dropped, this ought to be inside FindFreePascal.cmake |
125 if (FREEPASCAL_VERSION VERSION_LESS required_fpc_version) |
128 if (FREEPASCAL_VERSION VERSION_LESS required_fpc_version) |
126 message(FATAL_ERROR "Freepascal ${FREEPASCAL_VERSION} is too old, minimum version required is ${required_fpc_version}") |
129 message(FATAL_ERROR "Freepascal ${FREEPASCAL_VERSION} is too old, minimum version required is ${required_fpc_version}") |
127 endif() |
130 endif() |
128 |
131 |
160 #when you have multiple ld installation make sure you get the one bundled with the compiler |
163 #when you have multiple ld installation make sure you get the one bundled with the compiler |
161 get_filename_component(compiler_dir ${CMAKE_C_COMPILER} PATH) |
164 get_filename_component(compiler_dir ${CMAKE_C_COMPILER} PATH) |
162 list(APPEND pascal_flags "-FD${compiler_dir}") |
165 list(APPEND pascal_flags "-FD${compiler_dir}") |
163 endif(APPLE) |
166 endif(APPLE) |
164 |
167 |
165 if(NOT NOPNG) |
168 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP") |
166 find_package(PNG) |
169 if(PNG_FOUND) |
167 if(${PNG_FOUND}) |
170 list(APPEND pascal_flags "-dPNG_SCREENSHOTS") |
168 list(APPEND pascal_flags "-dPNG_SCREENSHOTS") |
|
169 if(APPLE) # fpc png unit doesn't pull the library (see bug 21833) |
|
170 list(APPEND pascal_flags "-k${PNG_LIBRARY}") |
|
171 endif() |
|
172 else() |
|
173 message(${WARNING} "Screenshots will be in BMP format because libpng was not found") |
|
174 endif() |
|
175 else() |
|
176 message(STATUS "Screenshots will be in BMP format per user request") |
|
177 endif() |
171 endif() |
178 |
172 |
179 |
173 |
180 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 |
174 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 |
181 if(FREEPASCAL_VERSION VERSION_LESS "2.6") |
175 if(FREEPASCAL_VERSION VERSION_LESS "2.6") |