Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off")
set(lib_src "${CMAKE_BINARY_DIR}/lib/build/mc_")
else()
set(lib_src "${CMAKE_SOURCE_DIR}/lib/")
endif()
set(srcs_lib pathmatch.cpp path.cpp)
foreach(file ${srcs_lib})
if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off")
set(src "${CMAKE_BINARY_DIR}/lib/build/mc_${file}")
set_source_files_properties(${src} PROPERTIES GENERATED TRUE)
else()
set(src "${CMAKE_SOURCE_DIR}/lib/${file}")
endif()
set(srcs_tools ${srcs_tools} ${src})
endforeach()

add_executable(dmake EXCLUDE_FROM_ALL
dmake.cpp
${CMAKE_SOURCE_DIR}/cli/filelister.cpp
${lib_src}pathmatch.cpp
${lib_src}path.cpp
${srcs_tools}
${CMAKE_SOURCE_DIR}/externals/simplecpp/simplecpp
)
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
Expand Down