File: CMakeLists.txt

package info (click to toggle)
obdgpslogger 0.16-1.3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 5,160 kB
  • ctags: 7,498
  • sloc: ansic: 73,206; cpp: 2,055; php: 407; sh: 51; makefile: 4
file content (64 lines) | stat: -rw-r--r-- 1,395 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
IF(NOT OBD_DISABLE_GUI)
	IF(NOT FLTK_FLUID_EXECUTABLE)
		MESSAGE(STATUS "Couldn't find fluid: required for building GUI")
	ENDIF(NOT FLTK_FLUID_EXECUTABLE)
	IF(NOT FLTK_FOUND)
		MESSAGE(STATUS "Couldn't find fltk: required for building GUI")
	ENDIF(NOT FLTK_FOUND)


	IF(FLTK_FOUND AND FLTK_FLUID_EXECUTABLE)

		INCLUDE_DIRECTORIES(
			.
			../obdinfo/
			${FLTK_INCLUDE_DIR}
		)

		FILE(GLOB OBDGUI_FL_GLOB
			*.fl
		)

		# GLOB includes a bunch of path prefix which confuses FLTK_WRAP_UI
		FOREACH(OBDGUI_FL_SRC ${OBDGUI_FL_GLOB})
			GET_FILENAME_COMPONENT(ONE_FL_SRC ${OBDGUI_FL_SRC} NAME)
			SET(OBDGUI_FL_SRCS ${OBDGUI_FL_SRCS} ${ONE_FL_SRC})
		ENDFOREACH(OBDGUI_FL_SRC)

		FLTK_WRAP_UI(ckobdfl ${OBDGUI_FL_SRCS})

		ADD_LIBRARY(ckobdfl STATIC ${ckobdfl_FLTK_UI_SRCS})


		FILE(GLOB OBDGUI_SRCS
			*.c
			*.cpp
			*.h
		)

		SET(OBDGUI_SRCS ${OBDGUI_SRCS})

		SET(OBDGUI_LIBS
			ckobdfl
			ckobdinfo
			ckobdconfigfile
			${FLTK_LIBRARIES}
		)

		IF("${CMAKE_SYSTEM}" MATCHES "Linux")
       		SET(OBDGUI_LIBS ${OBDGUI_LIBS} pthread dl)
		ENDIF("${CMAKE_SYSTEM}" MATCHES "Linux")

		ADD_EXECUTABLE(obdgui ${OBDGUI_SRCS})

		TARGET_LINK_LIBRARIES(obdgui ${OBDGUI_LIBS})

		INSTALL(TARGETS obdgui
			RUNTIME DESTINATION bin)
		INSTALL(FILES ${OBDGPSLogger_SOURCE_DIR}/man/man1/obdgui.1
			DESTINATION share/man/man1)


	ENDIF(FLTK_FOUND AND FLTK_FLUID_EXECUTABLE)
ENDIF(NOT OBD_DISABLE_GUI)