Skip to content

Commit

Permalink
Simplify itk cmake dir
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <[email protected]>
  • Loading branch information
uilianries committed Sep 16, 2024
1 parent 65f1d0b commit 7fa23d9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions recipes/itk/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,17 +471,7 @@ def libdl():
}

def _create_cmake_module_variables(self):
itk_version = Version(self.version)
lib_suffix = f"{itk_version.major}.{itk_version.minor}"

content = textwrap.dedent("""\
if (CONAN_LIB_DIRS_ITK)
set(ITK_CMAKE_DIR "${CONAN_LIB_DIRS_ITK}/cmake/ITK-%(version)s")
else()
set(ITK_CMAKE_DIR "${itk_LIB_DIRS_RELEASE}/cmake/ITK-%(version)s")
endif()
""" % {"version":lib_suffix})

content = 'set(ITK_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}")'
save(self, os.path.join(self.package_folder, self._module_variables_file_rel_path), content)

def _create_cmake_module_alias_targets(self):
Expand Down

0 comments on commit 7fa23d9

Please sign in to comment.