CMakeLists.txt
changeset 10008 b8b91c7e0da8
parent 10007 c28e4db7cca9
child 10013 4d7302e9b617
equal deleted inserted replaced
10007:c28e4db7cca9 10008:b8b91c7e0da8
   123     if(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
   123     if(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
   124         find_package(Lua)
   124         find_package(Lua)
   125     endif()
   125     endif()
   126 
   126 
   127     if(LUA_LIBRARY AND LUA_INCLUDE_DIR)
   127     if(LUA_LIBRARY AND LUA_INCLUDE_DIR)
   128         set(LUA_FOUND TRUE)
       
   129         #use an IMPORTED tharget so that we can just use 'lua' to link
   128         #use an IMPORTED tharget so that we can just use 'lua' to link
   130         add_library(lua UNKNOWN IMPORTED)
   129         add_library(lua UNKNOWN IMPORTED)
   131         set_target_properties(lua PROPERTIES IMPORTED_LOCATION ${LUA_LIBRARY})
   130         set_target_properties(lua PROPERTIES IMPORTED_LOCATION ${LUA_LIBRARY})
   132     else()
   131     else()
   133         message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version")
   132         message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version")
   162                                 "Perform an update or rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
   161                                 "Perform an update or rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
   163         endif()
   162         endif()
   164     endif()
   163     endif()
   165 
   164 
   166     if(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
   165     if(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
   167         set(PHYSFS_FOUND TRUE)
       
   168         #use an IMPORTED tharget so that we can just use 'physfs' to link
   166         #use an IMPORTED tharget so that we can just use 'physfs' to link
   169         add_library(physfs UNKNOWN IMPORTED)
   167         add_library(physfs UNKNOWN IMPORTED)
   170         set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
   168         set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
   171     else()
   169     else()
   172         message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
   170         message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")