# HG changeset patch # User koda # Date 1371218338 -7200 # Node ID a6ae0286787c9bb095cd72b13bd13f7074632110 # Parent 571e55b32da57bc3031dfa5c5a98f79d6fd69fbb when you don't use bundled dirs, add a fake target anyway, so you can use the same cmake syntax even if the target uses a different name diff -r 571e55b32da5 -r a6ae0286787c CMakeLists.txt --- a/CMakeLists.txt Fri Jun 14 15:47:55 2013 +0200 +++ b/CMakeLists.txt Fri Jun 14 15:58:58 2013 +0200 @@ -134,6 +134,9 @@ if (LUA_LIBRARY AND LUA_INCLUDE_DIR) set(LUA_FOUND TRUE) + #use an IMPORTED tharget so that we can just use 'lua' to link + add_library(lua UNKNOWN IMPORTED) + set_target_properties(lua PROPERTIES IMPORTED_LOCATION ${LUA_LIBRARY}) else() message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version") endif() @@ -170,6 +173,10 @@ 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() + #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}) endif() else() if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)