1 Star 0 Fork 31

nidepengyou163/ScreenCapture

forked from horsejs/ScreenCapture 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
liulun 提交于 2024-01-13 15:25 . bug
cmake_minimum_required(VERSION 3.18)
project(ScreenCapture)
set(SKIA_INCLUDE_PATH "D:\\sdk\\skia" CACHE PATH "Skia include path,default:D:/sdk/skia" FORCE)
set(SKIA_LIB_PATH "D:\\sdk\\skia\\out" CACHE PATH "Skia lib path,default:D:/sdk/skia/out" FORCE)
if(NOT IS_DIRECTORY "${SKIA_INCLUDE_PATH}")
message(FATAL_ERROR "The path ${SKIA_INCLUDE_PATH} does not exist.")
endif()
if(NOT IS_DIRECTORY "${SKIA_LIB_PATH}")
message(FATAL_ERROR "The path ${SKIA_LIB_PATH} does not exist.")
endif()
set(CMAKE_CXX_STANDARD 20)
if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
link_directories("${SKIA_LIB_PATH}")
include_directories("${SKIA_INCLUDE_PATH}")
add_executable(ScreenCapture)
add_subdirectory(res)
add_subdirectory(src)
if(WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
set_property(TARGET ScreenCapture PROPERTY VS_DPI_AWARE "PerMonitor")
target_compile_definitions(ScreenCapture PRIVATE $<$<CONFIG:Debug>:UNICODE _UNICODE DEBUG NOMINMAX _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS SK_DEBUG WIN32 _WINDOWS>)
target_compile_definitions(ScreenCapture PRIVATE $<$<CONFIG:Release>:UNICODE _UNICODE NDEBUG NOMINMAX _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS SK_RELEASE WIN32 _WINDOWS>)
TARGET_LINK_LIBRARIES(ScreenCapture skia Dwmapi winmm kernel32 user32 shell32 imm32)
elseif(APPLE)
endif()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/nidepengyou163/ScreenCapture.git
git@gitee.com:nidepengyou163/ScreenCapture.git
nidepengyou163
ScreenCapture
ScreenCapture
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385