CMakeLists.txt
changeset 9233 a6ae0286787c
parent 9229 5d5c5cbe7681
child 9236 ddd675825672
child 9262 b5a36423bd7e
equal deleted inserted replaced
9232:571e55b32da5 9233:a6ae0286787c
   132         find_package(Lua)
   132         find_package(Lua)
   133     endif()
   133     endif()
   134 
   134 
   135     if (LUA_LIBRARY AND LUA_INCLUDE_DIR)
   135     if (LUA_LIBRARY AND LUA_INCLUDE_DIR)
   136         set(LUA_FOUND TRUE)
   136         set(LUA_FOUND TRUE)
       
   137         #use an IMPORTED tharget so that we can just use 'lua' to link
       
   138         add_library(lua UNKNOWN IMPORTED)
       
   139         set_target_properties(lua PROPERTIES IMPORTED_LOCATION ${LUA_LIBRARY})
   137     else()
   140     else()
   138         message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version")
   141         message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version")
   139     endif()
   142     endif()
   140 else()
   143 else()
   141     if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
   144     if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
   168         endif()
   171         endif()
   169     endif()
   172     endif()
   170 
   173 
   171     if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
   174     if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
   172         message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
   175         message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
       
   176     else()
       
   177         #use an IMPORTED tharget so that we can just use 'physfs' to link
       
   178         add_library(physfs UNKNOWN IMPORTED)
       
   179         set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
   173     endif()
   180     endif()
   174 else()
   181 else()
   175     if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
   182     if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
   176         message(STATUS "PhysFS will be provided by the bundled sources")
   183         message(STATUS "PhysFS will be provided by the bundled sources")
   177     endif()
   184     endif()