Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
Sync engine/skia depends is now optional.
  • Loading branch information
rodlie committed Mar 31, 2024
1 parent 46724e4 commit eb4d19c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ProcessorCount(N)

option(USE_SKIA_SYSTEM_LIBS "Use skia (third-party) system libraries on Linux" ON)
option(LINUX_DEPLOY "Linux Deploy" OFF)
option(SYNC_SKIA_DEPS "Sync third-party depends" ON)

set(SKIA_SRC "${CMAKE_CURRENT_SOURCE_DIR}/skia")
set(SKIA_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/skia")
Expand All @@ -44,7 +45,11 @@ if(WIN32)
set(GN_PATH ${SKIA_SRC}/bin/gn.exe)
set(SKIA_ARGS_EXTRA --ide=vs)
set(SKIA_BUILD_CMD msbuild all.sln)
set(SKIA_UPDATE_CMD python.exe "tools\\git-sync-deps")
if(${SYNC_SKIA_DEPS})
set(SKIA_UPDATE_CMD python.exe "tools\\git-sync-deps")
else()
set(SKIA_UPDATE_CMD true)
endif()
set(SKIA_ARGS "target_os=\"windows\" host_os=\"win\" current_os=\"win\" target_cpu=\"x64\"")
set(SKIA_ARGS "${SKIA_ARGS} clang_win=\"C:\\Program Files\\LLVM\" cc=\"clang-cl\" cxx=\"clang-cl\"")
set(SKIA_ARGS "${SKIA_ARGS} extra_cflags=[\"-Wno-error\",\"/MD\",\"/O2\"]")
Expand All @@ -54,7 +59,11 @@ else()
if(${USE_SKIA_SYSTEM_LIBS})
set(SKIA_UPDATE_CMD true)
else()
set(SKIA_UPDATE_CMD python3 "tools/git-sync-deps")
if(${SYNC_SKIA_DEPS})
set(SKIA_UPDATE_CMD python3 "tools/git-sync-deps")
else()
set(SKIA_UPDATE_CMD true)
endif()
endif()
set(SKIA_ARGS "ar=\"${CMAKE_AR}\" cc=\"${CMAKE_C_COMPILER}\" cxx=\"${CMAKE_CXX_COMPILER}\"")
if (${LINUX_DEPLOY})
Expand Down

0 comments on commit eb4d19c

Please sign in to comment.