Skip to content

Commit

Permalink
fix: debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Dec 4, 2024
1 parent 1e2ca46 commit 991bdf9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ function(setup_target target)
Threads::Threads)
target_compile_definitions(
${target}
PRIVATE NOMINMAX
BOOST_FILESYSTEM_NO_LIB BOOST_FILESYSTEM_STATIC_LINK=1 CLI11_COMPILE
$<$<CONFIG:Debug>:_DEBUG>
$<$<CONFIG:Release>:NDEBUG>)
PRIVATE NOMINMAX BOOST_FILESYSTEM_NO_LIB BOOST_FILESYSTEM_STATIC_LINK=1 CLI11_COMPILE)
if (WIN32)
set(${target}
resources/resources_win32.rc)
Expand Down Expand Up @@ -98,10 +95,14 @@ elseif(APPLE)
set(SKIA_REPOSITORY
https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-macOS-Release-arm64.zip
)
set(SKIA_LIBRARY_DIR ${SKIA_DIR}/out/Release-arm64 CACHE PATH "Skia library directory")
set(SKIA_LIBRARY ${SKIA_LIBRARY_DIR}/libskia.a)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
set(SKIA_REPOSITORY
https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-macOS-Release-x64.zip
)
set(SKIA_LIBRARY_DIR ${SKIA_DIR}/out/Release-x64 CACHE PATH "Skia library directory")
set(SKIA_LIBRARY ${SKIA_LIBRARY_DIR}/libskia.a)
else()
message(FATAL_ERROR "Unsupported macOS architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
Expand All @@ -110,6 +111,7 @@ elseif(WIN32)
https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Windows-Release-x64.zip
)
set(SKIA_LIBRARY_DIR ${SKIA_DIR}/out/Release-x64 CACHE PATH "Skia library directory")
set(SKIA_LIBRARY ${SKIA_LIBRARY_DIR}/libskia.lib)
endif()

FetchContent_Declare(skia
Expand Down
8 changes: 2 additions & 6 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@
"inherits": "linux-base",
"displayName": "Release with Debug Info",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_CXX_FLAGS": "-O0",
"CMAKE_C_FLAGS": "-O0"
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
Expand All @@ -136,9 +134,7 @@
"inherits": "mac-base",
"displayName": "Release with Debug Info",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_CXX_FLAGS": "-O0",
"CMAKE_C_FLAGS": "-O0"
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
],
Expand Down

0 comments on commit 991bdf9

Please sign in to comment.