File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,28 @@ project(lslexamples
55
66include (GNUInstallDirs)
77
8- find_package (LSL REQUIRED
9- HINTS
10- ${LSL_INSTALL_ROOT}
11- "${CMAKE_CURRENT_LIST_DIR} /../install" # GHA scripts default install directory
12- "${CMAKE_CURRENT_LIST_DIR} /../cmake-build-release/install" # CLion default if using -DCMAKE_INSTALL_PREFIX=install
8+ set (LSL_SEARCH_PATHS
9+ ${LSL_INSTALL_ROOT}
10+ "${CMAKE_CURRENT_LIST_DIR} /../install" # GHA scripts default install directory
11+ "${CMAKE_CURRENT_LIST_DIR} /../cmake-build-release/install" # CLion default if using -DCMAKE_INSTALL_PREFIX=install
12+ )
13+ if (APPLE )
14+ # Also search in a Frameworks subdirectory for each path
15+ foreach (p IN LISTS LSL_SEARCH_PATHS)
16+ if (p)
17+ list (APPEND LSL_SEARCH_PATHS "${p} /Frameworks" )
18+ endif ()
19+ endforeach ()
20+ else ()
21+ # Add MSVC-specific paths if not on Apple
22+ list (APPEND LSL_SEARCH_PATHS
1323 "${CMAKE_CURRENT_LIST_DIR} /../cmake-build-release-visual-studio/install" # CLion default if using VS compiler
1424 "${CMAKE_CURRENT_LIST_DIR} /../out/build/x64-Release/install" # MSVC default if using -DCMAKE_INSTALL_PREFIX=install
25+ )
26+ endif ()
27+
28+ find_package (LSL REQUIRED
29+ HINTS ${LSL_SEARCH_PATHS}
1530 PATH_SUFFIXES share/LSL
1631)
1732get_filename_component (LSL_PATH ${LSL_CONFIG} DIRECTORY )
You can’t perform that action at this time.
0 commit comments