Skip to content

Commit

Permalink
fix pre_build
Browse files Browse the repository at this point in the history
  • Loading branch information
hggq committed Nov 14, 2024
1 parent 1eadccd commit cf11693
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/viewsrc/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/websockets/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty)
file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty)
endif ()
#EXECUTE_PROCESS(COMMAND rm ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty)
set(PAOZHU_PRE paozhu_pre)
add_executable(${PAOZHU_PRE} ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpcli/autopickmethod.cpp ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpserver/src/md5.cpp)
add_executable(paozhu_empty ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpcli/autoemptymethod.cpp)
add_executable(paozhu_pre ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpcli/autopickmethod.cpp ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpserver/src/md5.cpp)



Expand Down Expand Up @@ -199,12 +193,11 @@ endif()
if (ENABLE_WIN_VCPKG STREQUAL "ON")
else ()
add_custom_command(
TARGET ${PAOZHU_PRE}
TARGET paozhu_pre
PRE_BUILD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
COMMAND echo "-- controls method --"
COMMAND ${PAOZHU_PRE} ${CMAKE_CURRENT_SOURCE_DIR}/
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty
COMMAND paozhu_pre ${CMAKE_CURRENT_SOURCE_DIR}/
)
endif()

Expand Down

0 comments on commit cf11693

Please sign in to comment.