summaryrefslogtreecommitdiff
path: root/adm/cmake/TKService/CMakeLists.txt
blob: aba641e2000e2233805e385e0c7bd8a0c3491750 (plain)
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
SET(TOOLKIT TKService)

SET(TOOLKIT_MODULES
	AlienImage
	Aspect
	CGM
	Image
	MFT
	PS
	PlotMgt
	SelectBasics
	TColQuantity
	Viewer
)
IF (WIN32)
	SET(TOOLKIT_MODULES ${TOOLKIT_MODULES}
		InterfaceGraphic
		WNT
	)
ELSE(WIN32)
	SET(TOOLKIT_MODULES ${TOOLKIT_MODULES}
		ImageUtility
		Xw
	)
	SET(TOOLKIT_LIBS ${X11_Xmu_LIB} ${X11_LIBRARIES})
ENDIF(WIN32)
SET(TOOLKIT_DEPENDS TKMath TKernel)

IF(FREEIMAGE_LIBRARY AND ${PROJECT_NAME}_WITH_FREEIMAGE)
	ADD_DEFINITIONS(-DHAVE_FREEIMAGE)

	IF(CMAKE_CONFIGURATION_TYPES OR NMAKE)
		SET(TOOLKIT_LIBS_DEBUG ${TOOLKIT_LIBS_DEBUG} ${FREEIMAGE_LIBRARY_DEBUG})
		SET(TOOLKIT_LIBS_OPTIMIZED ${TOOLKIT_LIBS_OPTIMIZED} ${FREEIMAGE_LIBRARY})
	ELSE (CMAKE_CONFIGURATION_TYPES OR NMAKE)
		SET(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${FREEIMAGE_LIBRARY})
	ENDIF(CMAKE_CONFIGURATION_TYPES OR NMAKE)

	SET(TOOLKIT_INCLUDE_DIRECTORIES ${TOOLKIT_INCLUDE_DIRECTORIES} ${FREEIMAGE_INCLUDE_DIR})
ENDIF(FREEIMAGE_LIBRARY AND ${PROJECT_NAME}_WITH_FREEIMAGE)

INCLUDE(../BuildToolkit.cmake)

IF(BORLAND)
	# cgmobin.c, cgmochar.c and cgmotext.c need __STDC__=1 define in order to build for bcc32.
	foreach(source_file ${TOOLKIT_SOURCE_FILES} )
		if ((source_file MATCHES "cgmobin.c") OR
			(source_file MATCHES "cgmochar.c") OR
			(source_file MATCHES "cgmotext.c"))
			set_source_files_properties("${source_file}" PROPERTIES COMPILE_DEFINITIONS "__STDC__=1")
		endif()
	endforeach(source_file)
ENDIF(BORLAND)