2020-05-22 20:20:22 +02:00
|
|
|
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()
|
2020-05-10 16:41:50 +02:00
|
|
|
|
|
|
|
add_executable(dmake EXCLUDE_FROM_ALL
|
|
|
|
dmake.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/cli/filelister.cpp
|
2020-05-22 20:20:22 +02:00
|
|
|
${srcs_tools}
|
2020-05-23 07:16:49 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/lib/utils.cpp
|
2021-04-18 21:51:47 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/externals/simplecpp/simplecpp.cpp
|
2020-05-10 16:41:50 +02:00
|
|
|
)
|
|
|
|
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
|
2020-05-23 07:16:49 +02:00
|
|
|
if (WIN32 AND NOT BORLAND)
|
2021-03-29 17:04:42 +02:00
|
|
|
if(NOT MINGW)
|
|
|
|
target_link_libraries(dmake Shlwapi.lib)
|
|
|
|
else()
|
|
|
|
target_link_libraries(dmake shlwapi)
|
|
|
|
endif()
|
2020-05-23 07:16:49 +02:00
|
|
|
endif()
|
2020-05-10 16:41:50 +02:00
|
|
|
|
|
|
|
add_custom_target(run-dmake $<TARGET_FILE:dmake>
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
2021-03-29 17:04:42 +02:00
|
|
|
DEPENDS dmake)
|