Commit acaa58fb authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX #145] now works on windows for external module building

parent 81beaff4
...@@ -391,20 +391,24 @@ ENDFUNCTION( SETUP_CONFIGURED_FILE ) ...@@ -391,20 +391,24 @@ ENDFUNCTION( SETUP_CONFIGURED_FILE )
# _OTHERS you can add an arbitrary list of additional arguments which represent the files to copy. # _OTHERS you can add an arbitrary list of additional arguments which represent the files to copy.
FUNCTION( SETUP_ADDITIONAL_FILES _destination _component ) FUNCTION( SETUP_ADDITIONAL_FILES _destination _component )
FOREACH( _file ${ARGN} ) FOREACH( _file ${ARGN} )
FILE_TO_TARGETSTRING( ${_file} fileTarget ) # only do if it exists
IF( EXISTS ${OW_VERSION_FILENAME} )
# add a copy target # create useful target name
ADD_CUSTOM_TARGET( CopyAdditionalFile_${fileTarget}_${_component} FILE_TO_TARGETSTRING( ${_file} fileTarget )
ALL
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/${_destination}/" # add a copy target
COMMAND ${CMAKE_COMMAND} -E copy "${_file}" "${PROJECT_BINARY_DIR}/${_destination}/" ADD_CUSTOM_TARGET( CopyAdditionalFile_${fileTarget}_${_component}
COMMENT "Copying file ${_file}" ALL
) COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/${_destination}/"
COMMAND ${CMAKE_COMMAND} -E copy "${_file}" "${PROJECT_BINARY_DIR}/${_destination}/"
# add a INSTALL operation for this file COMMENT "Copying file ${_file}"
INSTALL( FILES ${_file} DESTINATION ${_destination} )
COMPONENT ${_component}
) # add a INSTALL operation for this file
INSTALL( FILES ${_file} DESTINATION ${_destination}
COMPONENT ${_component}
)
ENDIF()
ENDFOREACH() ENDFOREACH()
ENDFUNCTION( SETUP_ADDITIONAL_FILES ) ENDFUNCTION( SETUP_ADDITIONAL_FILES )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment