File: FileGLOBBER.cmake

package info (click to toggle)
cloudcompare 2.13.2%2Bgit20240821%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 151,196 kB
  • sloc: cpp: 687,219; ansic: 165,269; python: 31,109; xml: 25,906; sh: 940; makefile: 516; java: 229; asm: 204; fortran: 160; javascript: 73; perl: 18
file content (46 lines) | stat: -rw-r--r-- 1,146 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# For private plugins, this is a shortcut to add all cpp, h, and ui files without listing them
# in their own CMakeLists.txt files.
#
# It will look in the plugin's top-level directory and in the src, include, and ui directories.
#
# This is provided for convenience, but you should understand GLOB and its benefits and drawbacks.
#  See: https://cmake.org/cmake/help/latest/command/file.html#filesystem
#
# To use it, simply add the following line to your plugin's top-level CMakeList.txt file:
#	include( FileGLOBBER )

file( GLOB
	PLUGIN_HEADERS
		${CMAKE_CURRENT_SOURCE_DIR}/*.h
		${CMAKE_CURRENT_SOURCE_DIR}/include/*.h
)

file( GLOB
	PLUGIN_SOURCES
		${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
		${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
)

file( GLOB
	PLUGIN_UI_FILES
		${CMAKE_CURRENT_SOURCE_DIR}/*.ui
		${CMAKE_CURRENT_SOURCE_DIR}/ui/*.ui
)


target_include_directories( ${PROJECT_NAME}
	PRIVATE
		${CMAKE_CURRENT_SOURCE_DIR}
		${CMAKE_CURRENT_SOURCE_DIR}/include
)

target_sources( ${PROJECT_NAME}
   PRIVATE
	  ${PLUGIN_HEADERS}
	  ${PLUGIN_SOURCES}
	  ${PLUGIN_UI_FILES}
)

unset( PLUGIN_HEADERS )
unset( PLUGIN_SOURCES )
unset( PLUGIN_UI_FILES )