Skip to content

Commit

Permalink
[cmake] add a patch to disable building zlib examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hkrn committed Jan 2, 2025
1 parent 99d259a commit 25f7bab
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cmake/zlib.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fe939d..407ec52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -230,12 +230,12 @@ endif()
# Example binaries
#============================================================================

-add_executable(example test/example.c)
-target_link_libraries(example zlib)
-add_test(example example)
+# add_executable(example test/example.c)
+# target_link_libraries(example zlib)
+# add_test(example example)

-add_executable(minigzip test/minigzip.c)
-target_link_libraries(minigzip zlib)
+# add_executable(minigzip test/minigzip.c)
+# target_link_libraries(minigzip zlib)

if(HAVE_OFF64_T)
add_executable(example64 test/example.c)
6 changes: 6 additions & 0 deletions scripts/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,12 @@ execute_process(COMMAND ${GIT_EXECUTABLE} checkout -- .
execute_process(COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change ${CMAKE_CURRENT_SOURCE_DIR}/cmake/bullet-2.76.diff
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/bullet3
RESULT_VARIABLE result)
execute_process(COMMAND ${GIT_EXECUTABLE} checkout -- .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib
RESULT_VARIABLE result)
execute_process(COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change ${CMAKE_CURRENT_SOURCE_DIR}/cmake/zlib.diff
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib
RESULT_VARIABLE result)
execute_process(COMMAND ${GIT_EXECUTABLE} checkout -- .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/glslang)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/glslang/glslang/Include/InfoSink.h input_info_sink_h NEWLINE_CONSUME)
Expand Down

0 comments on commit 25f7bab

Please sign in to comment.