Squashed 'cmake/' changes from 8647ab0..93c492f
93c492f update help bdbb86e Remove outdated modules 2eeb40f don't force MACOSX_BUNDLE to be on. 57f63d8 move fixupbundle.cmake.in and improve finding it bcc9e7b no need to include juggler resource files here when they're included with jugger 9a9b875 make juggler find its config files more safely 032b44d fix typo in comment 46224b1 fixes to findwinhid from vrpn 6c61b84 fix lua targets handling of imported luac and luac in the build. e449cd7 add support for visual studio 2010 to createlaunchers f9dc1ea GetGitRevisionDescription: Fixes HASH value in a named branch checkout f914306 add cppunit module 19bd3ea add fftw module from itk git-subtree-dir: cmake git-subtree-split: 93c492fb8fe8c7c9434af72d051795a6ad19cbcd
This commit is contained in:
@@ -30,15 +30,26 @@ set(__add_lua YES)
|
||||
include(FileCopyTargets)
|
||||
|
||||
function(add_lua_target _target _dest)
|
||||
|
||||
|
||||
if(NOT ARGN)
|
||||
message(WARNING
|
||||
"In add_lua_target call for target ${_target}, no source files were specified!")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT LUA_TARGET_LUAC_EXECUTABLE)
|
||||
set(LUA_TARGET_LUAC_EXECUTABLE luac)
|
||||
if(TARGET luac)
|
||||
message(STATUS "luac target found, using that in add_lua_target")
|
||||
set(LUA_TARGET_LUAC_EXECUTABLE luac)
|
||||
else()
|
||||
find_executable(LUA_TARGET_LUAC_EXECUTABLE
|
||||
NAMES
|
||||
luac)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT LUA_TARGET_LUAC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Can't find luac: please give LUA_TARGET_LUAC_EXECUTABLE a useful value - currently ${LUA_TARGET_LUAC_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
set(ALLFILES)
|
||||
@@ -70,7 +81,10 @@ function(add_lua_target _target _dest)
|
||||
SOURCES ${ARGN}
|
||||
DEPENDS ${ALLFILES})
|
||||
if(TARGET "${LUA_TARGET_LUAC_EXECUTABLE}")
|
||||
add_dependencies(${_target} ${LUA_TARGET_LUAC_EXECUTABLE})
|
||||
get_property(_luac_imported TARGET "${LUA_TARGET_LUAC_EXECUTABLE}" PROPERTY IMPORTED)
|
||||
if(NOT _luac_imported)
|
||||
add_dependencies(${_target} ${LUA_TARGET_LUAC_EXECUTABLE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${_target} PROPERTY FILE_COPY_TARGET YES)
|
||||
|
||||
Reference in New Issue
Block a user