-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
321 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
find_package(double-conversion REQUIRED CONFIG) | ||
find_package(Eigen3 REQUIRED CONFIG) | ||
find_package(EXPAT REQUIRED MODULE) | ||
find_package(JPEG REQUIRED CONFIG) | ||
find_package(OpenJPEG REQUIRED CONFIG) | ||
find_package(PNG REQUIRED) | ||
find_package(TIFF REQUIRED) | ||
find_package(ZLIB REQUIRED) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt | ||
index 103eaa9dd5..35ea012fbd 100644 | ||
--- a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt | ||
+++ b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt | ||
@@ -1,16 +1,7 @@ | ||
project(ITKOpenJPEG) | ||
set(ITKOpenJPEG_THIRD_PARTY 1) | ||
|
||
-set(ITKOpenJPEG_INCLUDE_DIRS | ||
- ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg | ||
- ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg | ||
- ) | ||
-set(ITKOpenJPEG_LIBRARIES itkopenjpeg) | ||
-set(ITK_LIBRARY_PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE) | ||
- | ||
+find_package(OpenJPEG REQUIRED CONFIG) | ||
+set(ITKOpenJPEG_LIBRARIES openjp2) | ||
+set(ITKOpenJPEG_NO_SRC 1) | ||
itk_module_impl() | ||
- | ||
-install(FILES ${ITKOpenJPEG_SOURCE_DIR}/src/itk_openjpeg.h | ||
- DESTINATION ${ITKOpenJPEG_INSTALL_INCLUDE_DIR} | ||
- COMPONENT Development | ||
- ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package) | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
project(test_package CXX) | ||
|
||
find_package(ITK REQUIRED CONFIG) | ||
#todo: add REQUIRED after removal of test_v1_package | ||
find_package(HDF5 COMPONENTS CXX) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} ITKCommon hdf5::hdf5_cpp) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE ITKCommon hdf5::hdf5_cpp) | ||
#itksys is already linked through dependencies of ITKCommon but we also want to check name alias | ||
target_link_libraries(${PROJECT_NAME} PRIVATE ITK::itksys) | ||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
from conans import ConanFile, CMake, tools | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import cmake_layout, CMake | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(bin_path, env="conanrun") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ | ||
${CMAKE_CURRENT_BINARY_DIR}/test_package/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from conans import ConanFile, CMake | ||
from conan.tools.build import cross_building | ||
import os | ||
|
||
|
||
class TestPackageV1Conan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) |