# CMakeList.txt: template_proc 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#


# 添加LIB路径
link_directories("${LIB_PATH}logger")
link_directories("${LIB_PATH}rttr")
link_directories("${LIB_PATH}openssl")
link_directories("${LIB_PATH}cppdb")
link_directories("${LIB_PATH}boost")

# 添加include路径
include_directories("${INCLUDE_PATH}include")
include_directories("${INCLUDE_PATH}robot")

#代码生成器路径
execute_process(COMMAND "${GENERATOR_PATH}code_generator_command" "${CMAKE_CURRENT_SOURCE_DIR}")


# 代码生成器使用
#add_executable(sync_service "main.cpp")

# 将源代码添加到此项目的可执行文件。
add_executable("${PROJECT_NAME}" "main.cpp" "models/web_sync_item_request_info.h"      "models/web_sync_config_info.h" "models/web_regex_config_info.h" "models/web_general_config_info.h" "models/web_drop_config_info.h")

if (CMAKE_VERSION VERSION_GREATER 3.12)
  set_property(TARGET "${PROJECT_NAME}" PROPERTY CXX_STANDARD 20)
endif()

# 判断编译器
if (MSVC)
    target_compile_options("${PROJECT_NAME}" PRIVATE /bigobj)
    target_compile_options("${PROJECT_NAME}" PRIVATE /utf-8)
endif()

# 判断平台
if (WIN32)
    #lib依赖
    target_link_libraries("${PROJECT_NAME}" rttr_core cppdb logger libcrypto libssl Crypt32)
elseif(IOS)
elseif(UNIX)
    target_link_libraries("${PROJECT_NAME}" pthread rttr_core cppdb logger crypto ssl dl X11)
endif()
# TODO: 如有需要，请添加测试并安装目标。
