--- plugins/qFacets/CMakeLists.txt.orig	2018-03-16 21:26:02 UTC
+++ plugins/qFacets/CMakeLists.txt
@@ -4,7 +4,7 @@ option( INSTALL_QFACETS_PLUGIN "Check to
 
 # CloudCompare 'FACETS' plugin
 if (INSTALL_QFACETS_PLUGIN)
-	if (NOT SHAPELIB_SOURCE_DIR)
+	if (NOT OPTION_USE_SHAPE_LIB)
 		message( SEND_ERROR "ShapeLib is required to compile this plugin (enable OPTION_USE_SHAPE_LIB)" )
 	endif()
 
@@ -27,7 +27,7 @@ if (INSTALL_QFACETS_PLUGIN)
 	target_link_libraries( ${PROJECT_NAME} QCC_IO_LIB )
 	
 	#add shapelib support
-	target_link_libraries( ${PROJECT_NAME} SHAPELIB )
-	include_directories( ${SHAPELIB_SOURCE_DIR} )
+	target_link_libraries( ${PROJECT_NAME} shp )
+	#include_directories( ${SHAPELIB_SOURCE_DIR} )
 	set_property( TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS CC_SHP_SUPPORT )
 endif()
