代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 2.8.12)
project(kwaf)
file(GLOB KWAF_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
set(CMAKE_CXX_STANDARD 14)
option(KANGLE_DIR "set kangle dir")
list(APPEND CMAKE_REQUIRED_INCLUDES ${KANGLE_DIR}/include)
list(APPEND CMAKE_REQUIRED_INCLUDES ${KANGLE_DIR}/kasync/include)
list(APPEND CMAKE_REQUIRED_INCLUDES ${KANGLE_DIR}/khttpd/include)
list(APPEND CMAKE_REQUIRED_INCLUDES ${KANGLE_DIR}/khttpd/davlib)
include(CheckIncludeFiles)
check_include_files("ksapi.h;kfeature.h;kforwin32.h" FOUND_KSAPI_HEADER)
if(NOT FOUND_KSAPI_HEADER)
message(FATAL_ERROR "cann't found ksapi.h. try cmake -DKANGLE_DIR=kangle_dir ${CMAKE_REQUIRED_INCLUDES}")
endif()
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/khttpd/src/KHttpHeader.cpp)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/khttpd/src/KHttpLib.cpp)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/khttpd/src/KStream.cpp)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/khttpd/src/KStringBuf.cpp)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/src/KSequence.cpp)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/src/kmd5.cpp)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/kasync/src/krbtree.c)
list(APPEND KWAF_SOURCE_FILES ${KANGLE_DIR}/kasync/src/kmalloc.c)
set_source_files_properties(${KWAF_SOURCE_FILES} PROPERTIES LANGUAGE CXX)
add_library(kwaf MODULE ${KWAF_SOURCE_FILES})
set_property(TARGET kwaf PROPERTY PREFIX "")
target_include_directories(kwaf PUBLIC ${CMAKE_REQUIRED_INCLUDES})
target_link_directories(kwaf PUBLIC ${KWEB_LIBS_DIR})
set_target_properties(kwaf PROPERTIES LINKER_LANGUAGE CXX)
set(CMAKE_INSTALL_PREFIX ${KANGLE_DIR})
install(TARGETS kwaf LIBRARY DESTINATION bin)
install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/ext/
DESTINATION "ext"
)
include(CPack)
set(CPACK_PACKAGE_NAME "kwaf")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。