Mercurial > hg > Members > anatofuz > CbC_xv6
comparison src/CMakeLists.txt @ 85:d33e6b5adb57
tweak include_directories
author | anatofuz |
---|---|
date | Tue, 15 Oct 2019 16:14:18 +0900 |
parents | a4307abefd0b |
children | 765449889623 |
comparison
equal
deleted
inserted
replaced
84:a4307abefd0b | 85:d33e6b5adb57 |
---|---|
48 set(CMAKE_KERNEL_DIR "${CMAKE_BINARY_DIR}") | 48 set(CMAKE_KERNEL_DIR "${CMAKE_BINARY_DIR}") |
49 set(CMAKE_KERNEL_DIR_C "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${_Gears_TARGET}.dir") | 49 set(CMAKE_KERNEL_DIR_C "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${_Gears_TARGET}.dir") |
50 | 50 |
51 set (_Gears_CBC_SOURCES) | 51 set (_Gears_CBC_SOURCES) |
52 set (_Gears_CSOURCES) | 52 set (_Gears_CSOURCES) |
53 include_directories("${CMAKE_BINARY_DIR}" ".") | |
54 foreach(i ${_Gears_SOURCES}) | 53 foreach(i ${_Gears_SOURCES}) |
55 if (${i} MATCHES "\\.cbc") | 54 if (${i} MATCHES "\\.cbc") |
56 string(REGEX REPLACE "(.*).cbc" "c/\\1.c" j ${i}) | 55 string(REGEX REPLACE "(.*).cbc" "c/\\1.c" j ${i}) |
57 add_custom_command ( | 56 add_custom_command ( |
58 OUTPUT ${CMAKE_KERNEL_DIR_C}/${j} | 57 OUTPUT ${CMAKE_KERNEL_DIR_C}/${j} |
83 OUTPUT ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c | 82 OUTPUT ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c |
84 DEPENDS ${_Gears_CBC_SOURCES} fs.img initcode | 83 DEPENDS ${_Gears_CBC_SOURCES} fs.img initcode |
85 COMMAND "cd" "CMakeFiles/kernel.dir" ";" "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CBC_SOURCES} | 84 COMMAND "cd" "CMakeFiles/kernel.dir" ";" "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CBC_SOURCES} |
86 ) | 85 ) |
87 # add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c ) | 86 # add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c ) |
87 include_directories(${_Gears_TARGET} PUBLIC ".") | |
88 include_directories(${_Gears_TARGET} PUBLIC ${CMAKE_KERNEL_DIR_C}) | |
88 add_executable(${_Gears_TARGET} ${CMAKE_KERNEL_DIR_C} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c ) | 89 add_executable(${_Gears_TARGET} ${CMAKE_KERNEL_DIR_C} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c ) |
89 # target_link_libraries(${_Gears_TARGET} m pthread) | 90 # target_link_libraries(${_Gears_TARGET} m pthread) |
90 endmacro() | 91 endmacro() |
91 | 92 |
92 | 93 |