File tree Expand file tree Collapse file tree 1 file changed +3
-22
lines changed Expand file tree Collapse file tree 1 file changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -869,28 +869,9 @@ endfunction()
869
869
870
870
# Get path to libclang.dll/libclang.so depending on the platform
871
871
macro (find_libclang )
872
- if (CMAKE_HOST_WIN32 )
873
- set (libclang_directory_suffix "bin" )
874
- set (libclang_suffix ".dll" )
875
- else ()
876
- set (libclang_directory_suffix "lib" )
877
- if (CMAKE_HOST_APPLE )
878
- set (libclang_suffix ".dylib" )
879
- else ()
880
- set (libclang_suffix ".so" )
881
- endif ()
882
- endif ()
883
-
884
- set (libclang_lib_dir "" )
885
- if (DEFINED ENV{LLVM_INSTALL_DIR} )
886
- set (libclang_lib_dir "$ENV{LLVM_INSTALL_DIR} /${libclang_directory_suffix} " )
887
- elseif (DEFINED ENV{CLANG_INSTALL_DIR} )
888
- set (libclang_lib_dir "$ENV{CLANG_INSTALL_DIR} /${libclang_directory_suffix} " )
889
- else ()
890
- message (WARNING
891
- "Couldn't find libclang${libclang_suffix} "
892
- "You will likely need to add it manually to PATH to ensure the build succeeds." )
893
- endif ()
872
+ find_package (Clang CONFIG REQUIRED )
873
+ get_target_property (libclang_location libclang LOCATION )
874
+ get_filename_component (libclang_lib_dir "${libclang_location} " DIRECTORY )
894
875
endmacro ()
895
876
896
877
# Allow setting a shiboken debug level from the the build system or from the environment
You can’t perform that action at this time.
0 commit comments