[COMCTL32] Install comctl32 v6 and its manifest in first stage
[reactos.git] / sdk / cmake / bison-flex.cmake
1
2 # Simply use :
3 # add_bison_files(foo.y)
4 # and
5 # add_flex_files(foo.l)
6 # then add ${CMAKE_CURRENT_BINARY_DIR}/foo.tab.c
7 # and ${CMAKE_CURRENT_BINARY_DIR}/foo.yy.c to the source list
8
9 function(add_bison_files)
10 foreach(_file ${ARGN})
11 get_filename_component(_name ${_file} NAME_WE)
12 add_custom_command(
13 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}.tab.c ${CMAKE_CURRENT_BINARY_DIR}/${_name}.tab.h
14 COMMAND bison -p ${_name}_ -o ${CMAKE_CURRENT_BINARY_DIR}/${_name}.tab.c --defines=${CMAKE_CURRENT_BINARY_DIR}/${_name}.tab.h ${CMAKE_CURRENT_SOURCE_DIR}/${_file}
15 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
16 endforeach()
17 endfunction()
18
19 function(add_flex_files)
20 foreach(_file ${ARGN})
21 get_filename_component(_name ${_file} NAME_WE)
22 add_custom_command(
23 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}.yy.c ${CMAKE_CURRENT_BINARY_DIR}/${_name}.yy.h
24 COMMAND flex -o ${CMAKE_CURRENT_BINARY_DIR}/${_name}.yy.c --header-file=${CMAKE_CURRENT_BINARY_DIR}/${_name}.yy.h ${CMAKE_CURRENT_SOURCE_DIR}/${_file}
25 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
26 endforeach()
27 endfunction()