File: ShapeLibSupport.cmake

package info (click to toggle)
cloudcompare 2.10.3-4
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 57,516 kB
  • sloc: cpp: 219,980; ansic: 29,944; makefile: 78; sh: 21
file content (17 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# ------------------------------------------------------------------------------
# ShapeLib + CMake support for CloudCompare
# ------------------------------------------------------------------------------

OPTION( OPTION_USE_SHAPE_LIB "Build with ShapeLib (SHP files support)" OFF )
if( ${OPTION_USE_SHAPE_LIB} )
	add_subdirectory(contrib/shapelib-1.3.0)
	include_directories( ${SHAPELIB_SOURCE_DIR} )
endif()

# Link project with shapelib library
function( target_link_SHAPE_LIB ) # 2 arguments: ARGV0 = project name
	if( ${OPTION_USE_SHAPE_LIB} )
		target_link_libraries( ${PROJECT_NAME} SHAPELIB )	
		set_property( TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS CC_SHP_SUPPORT )
	endif()
endfunction()