Skip to content

Commit 23dfaca

Browse files
committed
Update openslide on linux and mac
1 parent 78307c2 commit 23dfaca

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

.github/workflows/CI-mac-arm64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
brew reinstall zlib
25-
brew install openslide pcre libomp
25+
brew install libomp
2626
# Install a specific version of libomp (14.0.6) since newer versions fail with cmake
2727
#curl https://raw.githubusercontent.com/Homebrew/homebrew-core/c87d6a0c8360c4684e3375ce6c4576214acdd71b/Formula/libomp.rb > $(find $(brew --repository) -name libomp.rb) && brew reinstall libomp
2828
@@ -131,7 +131,7 @@ jobs:
131131
- name: Install dependencies
132132
run: |
133133
brew reinstall zlib
134-
brew install openslide pcre libomp
134+
brew install libomp
135135
# OpenCL on apple silicon only supports GPU which
136136
# the GitHub nodes don't have, thus we install pocl
137137
# which supports CPUs

.github/workflows/CI-mac-x86_64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
brew reinstall zlib
2525
brew reinstall libtiff
26-
brew install openslide pcre libomp
26+
brew install libomp
2727
# Install a specific version of libomp (14.0.6) since newer versions fail with cmake
2828
#curl https://raw.githubusercontent.com/Homebrew/homebrew-core/c87d6a0c8360c4684e3375ce6c4576214acdd71b/Formula/libomp.rb > $(find $(brew --repository) -name libomp.rb) && brew reinstall libomp
2929
@@ -128,7 +128,7 @@ jobs:
128128
run: |
129129
brew reinstall zlib
130130
brew reinstall libtiff
131-
brew install openslide pcre libomp
131+
brew install libomp
132132
- name: Download wheel artifact
133133
uses: actions/download-artifact@v4
134134
with:
@@ -167,7 +167,7 @@ jobs:
167167
run: |
168168
brew reinstall zlib
169169
brew reinstall libtiff
170-
brew install openslide pcre libomp
170+
brew install libomp
171171
- name: Download wheel artifact
172172
uses: actions/download-artifact@v4
173173
with:

cmake/ExternalOpenSlide.cmake

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ if(WIN32)
77
ExternalProject_Add(openslide
88
PREFIX ${FAST_EXTERNAL_BUILD_DIR}/openslide
99
BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/openslide
10-
URL "https://github.com/openslide/openslide-bin/releases/download/v20231011/openslide-win64-20231011.zip"
10+
URL "https://github.com/openslide/openslide-bin/releases/download/v4.0.0.8/openslide-bin-4.0.0.8-windows-x64.zip"
1111
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/openslide/src/openslide/ ${FAST_EXTERNAL_INSTALL_DIR}
1212
BUILD_COMMAND ""
1313
INSTALL_COMMAND ""
1414
)
1515

16+
list(APPEND FAST_EXTERNAL_DEPENDENCIES openslide)
17+
elseif(APPLE)
18+
19+
ExternalProject_Add(openslide
20+
PREFIX ${FAST_EXTERNAL_BUILD_DIR}/openslide
21+
BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/openslide
22+
URL "https://github.com/openslide/openslide-bin/releases/download/v4.0.0.8/openslide-bin-4.0.0.8-macos-arm64-x86_64.tar.xz"
23+
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/openslide/src/openslide/ ${FAST_EXTERNAL_INSTALL_DIR}
24+
BUILD_COMMAND ""
25+
INSTALL_COMMAND ""
26+
)
1627
list(APPEND FAST_EXTERNAL_DEPENDENCIES openslide)
1728
endif()

cmake/ModuleWholeSlideImaging.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ if(FAST_MODULE_WholeSlideImaging)
1212
tiff.lib
1313
)
1414
elseif(APPLE)
15+
include(cmake/ExternalOpenSlide.cmake)
16+
1517
set(CMAKE_FIND_FRAMEWORK LAST) # Avoid wrong TIFF header from Mono.framework being used
1618
# Get OpenSlide and TIFF from OS
17-
find_package(OpenSlide REQUIRED)
1819
find_package(TIFF REQUIRED)
1920
find_package(JPEG REQUIRED)
2021

21-
list(APPEND LIBRARIES ${OPENSLIDE_LIBRARIES} ${TIFF_LIBRARIES} ${JPEG_LIBRARIES})
22-
list(APPEND FAST_INCLUDE_DIRS ${OPENSLIDE_INCLUDE_DIRS} ${TIFF_INCLUDE_DIRS})
23-
message(STATUS "TIFF FOUND: ${TIFF_LIBRARY} ${TIFF_LIBRARIES} ${TIFF_INCLUDE_DIRS}")
22+
list(APPEND LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} libopenslide.dylib)
23+
list(APPEND FAST_INCLUDE_DIRS ${TIFF_INCLUDE_DIRS} ${FAST_EXTERNAL_INSTALL_DIR}/include/openslide/)
2424
else()
2525
fast_download_dependency(tiff
2626
4.3.0

0 commit comments

Comments
 (0)