# HG changeset patch # User koda # Date 1389978289 -3600 # Node ID c28e4db7cca95850d2f9bcc8edfb28c78b00dca6 # Parent 921e7b71330fb5c74481b6da463c5ccb564bf1d1 fix linking physfs after a run of cmake diff -r 921e7b71330f -r c28e4db7cca9 CMakeLists.txt --- a/CMakeLists.txt Fri Jan 17 16:50:01 2014 +0100 +++ b/CMakeLists.txt Fri Jan 17 18:04:49 2014 +0100 @@ -163,12 +163,13 @@ endif() endif() - if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR) - message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") - else() + if(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR) + set(PHYSFS_FOUND TRUE) #use an IMPORTED tharget so that we can just use 'physfs' to link add_library(physfs UNKNOWN IMPORTED) set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY}) + else() + message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") endif() else() if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)