|
|
|
@ -12,15 +12,21 @@ IF (NOT APPLE)
|
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
ENDIF(NOT APPLE)
|
|
|
|
|
|
|
|
|
|
IF (APPLE OR UNIX)
|
|
|
|
|
SET(RUBYAUTOGEN ruby-autogen-gcc.rb)
|
|
|
|
|
ELSE (APPLE OR UNIX)
|
|
|
|
|
SET(RUBYAUTOGEN ruby-autogen-win.rb)
|
|
|
|
|
ENDIF (APPLE OR UNIX)
|
|
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb
|
|
|
|
|
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codegen.pl ${dfhack_SOURCE_DIR}/library/include/df/codegen.out.xml ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb
|
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${RUBYAUTOGEN}
|
|
|
|
|
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codegen.pl ${dfhack_SOURCE_DIR}/library/include/df/codegen.out.xml ${CMAKE_CURRENT_BINARY_DIR}/${RUBYAUTOGEN}
|
|
|
|
|
# cmake quirk: depending on codegen.out.xml or generate_headers only is not enough, needs both
|
|
|
|
|
# test by manually patching any library/xml/moo.xml, run make ruby-autogen-rb -j2, and check build/plugins/ruby/ruby-autogen.rb for patched xml data
|
|
|
|
|
DEPENDS generate_headers ${dfhack_SOURCE_DIR}/library/include/df/codegen.out.xml ${CMAKE_CURRENT_SOURCE_DIR}/codegen.pl
|
|
|
|
|
COMMENT ruby-autogen.rb
|
|
|
|
|
COMMENT ${RUBYAUTOGEN}
|
|
|
|
|
)
|
|
|
|
|
ADD_CUSTOM_TARGET(ruby-autogen-rb DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb)
|
|
|
|
|
ADD_CUSTOM_TARGET(ruby-autogen-rb DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${RUBYAUTOGEN})
|
|
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES("${dfhack_SOURCE_DIR}/depends/tthread")
|
|
|
|
|
|
|
|
|
@ -33,4 +39,4 @@ INSTALL(DIRECTORY .
|
|
|
|
|
DESTINATION hack/ruby
|
|
|
|
|
FILES_MATCHING PATTERN "*.rb")
|
|
|
|
|
|
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DESTINATION hack/ruby)
|
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RUBYAUTOGEN} DESTINATION hack/ruby)
|
|
|
|
|