equal
deleted
inserted
replaced
161 message(FATAL_ERROR "PhysFS version is too old (detected ${physfs_detected_ver}, required 2.0.0)" |
161 message(FATAL_ERROR "PhysFS version is too old (detected ${physfs_detected_ver}, required 2.0.0)" |
162 "Perform an update or rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |
162 "Perform an update or rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |
163 endif() |
163 endif() |
164 endif() |
164 endif() |
165 |
165 |
166 if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR) |
166 if(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR) |
167 message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |
167 set(PHYSFS_FOUND TRUE) |
168 else() |
|
169 #use an IMPORTED tharget so that we can just use 'physfs' to link |
168 #use an IMPORTED tharget so that we can just use 'physfs' to link |
170 add_library(physfs UNKNOWN IMPORTED) |
169 add_library(physfs UNKNOWN IMPORTED) |
171 set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY}) |
170 set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY}) |
|
171 else() |
|
172 message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |
172 endif() |
173 endif() |
173 else() |
174 else() |
174 if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR) |
175 if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR) |
175 message(STATUS "PhysFS will be provided by the bundled sources") |
176 message(STATUS "PhysFS will be provided by the bundled sources") |
176 endif() |
177 endif() |