File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,18 +45,22 @@ def good_directory(directory: Path):
4545 if not include_path .exists () or not bindir .exists ():
4646 return
4747
48+ # Define the libraries directory based on where the CycloneDDS library
49+ # has been installed. That is required because CMake overrides the libraries
50+ # directory definition 'lib' with 'lib64' depending on the operating system.
4851 libdir = dir / 'lib'
49- if not libdir .exists ():
50- libdir = dir / 'lib64'
51- if not libdir .exists ():
52- return None
53-
5452 if platform .system () == 'Windows' :
5553 ddsc_library = bindir / "ddsc.dll"
5654 elif platform .system () == 'Darwin' :
5755 ddsc_library = libdir / "libddsc.dylib"
5856 else :
5957 ddsc_library = libdir / "libddsc.so"
58+ if not ddsc_library .exists ():
59+ libdir = dir / 'lib64'
60+ ddsc_library = libdir / "libddsc.so"
61+
62+ if not libdir .exists ():
63+ return None
6064
6165 if not ddsc_library .exists ():
6266 return None
Original file line number Diff line number Diff line change @@ -53,10 +53,11 @@ def _loader_cyclonedds_home_gen(name):
5353 If CYCLONEDDS_HOME is set it is required to be valid and must be used to load.
5454 """
5555 def _loader_cyclonedds_home ():
56- if "CYCLONEDDS_HOME" not in os .environ :
57- return None
58-
59- return _load (os .path .join (os .environ ["CYCLONEDDS_HOME" ], name ))
56+ if "CYCLONEDDS_HOME" in os .environ :
57+ path = os .path .join (os .environ ["CYCLONEDDS_HOME" ], name )
58+ if os .path .exists (path ):
59+ return _load (path )
60+ return None
6061 return _loader_cyclonedds_home
6162
6263
@@ -93,6 +94,7 @@ def _loader_install_path():
9394_loaders_per_system = {
9495 "Linux" : [
9596 _loader_wheel_gen ([".." , "cyclonedds.libs" ], ".so" ),
97+ _loader_cyclonedds_home_gen (f"lib64{ os .sep } libddsc.so" ),
9698 _loader_cyclonedds_home_gen (f"lib{ os .sep } libddsc.so" ),
9799 _loader_on_path_gen ("libddsc.so" ),
98100 _loader_install_path
You can’t perform that action at this time.
0 commit comments