# HG changeset patch # User anatofuz # Date 1564566653 -32400 # Node ID 6ebe7043702cdd3ffb60511b1bf65e27e3a20325 # Parent 1e1c6feb7d83267d339e22ec6f2efbd97952034f fix generated source at usr commands diff -r 1e1c6feb7d83 -r 6ebe7043702c src/usr/CMakeLists.txt --- a/src/usr/CMakeLists.txt Tue Jul 30 18:00:52 2019 +0900 +++ b/src/usr/CMakeLists.txt Wed Jul 31 18:50:53 2019 +0900 @@ -43,16 +43,17 @@ list(APPEND _Gears_CBC_SOURCES ${j}) else() set(j ${i}) + file(COPY "${CMAKE_SOURCE_DIR}/context.h" DESTINATION "${CMAKE_BINARY_DIR}/usr/${_Gears_TARGET}.dir") list(APPEND _Gears_CSOURCES ${j}) endif() endforeach(i) add_custom_command ( - OUTPUT c/${_Gears_TARGET}-context.c + OUTPUT ${_Gears_TARGET}.dir/c/${_Gears_TARGET}-context.c DEPENDS ${_Gears_CBC_SOURCES} - COMMAND "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CBC_SOURCES} + COMMAND "cd" "${_Gears_TARGET}.dir" ";" "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${CMAKE_SOURCE_DIR}/usr/${_Gears_CSOURCES} ) - add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c ) + add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${_Gears_TARGET}.dir/c/${_Gears_TARGET}-context.c ) target_link_libraries(${_Gears_TARGET} ulib) endmacro()