0027152: Undefined symbols in library TKernel.so using clang compiler
[occt.git] / adm / cmake / occt_csf.cmake
CommitLineData
fb3267c7 1# CSF variables definition
2
e713baee 3if(CSFS_ALREADY_INCLUDED)
4 return()
5endif()
6set(CSFS_ALREADY_INCLUDED 1)
7
8
fb3267c7 9if (NOT DEFINED USE_TCL)
10 OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
11endif()
12
13if (USE_TCL)
14 if ("${3RDPARTY_TCL_LIBRARY_VERSION}" STREQUAL "")
a6874708 15 message (STATUS "Warning: TCL version has not been specified by CSF_TclLibs defining thus it will be used as 8.6")
fb3267c7 16 set (3RDPARTY_TCL_LIBRARY_VERSION "8.6")
17 endif()
18
19 if ("${3RDPARTY_TK_LIBRARY_VERSION}" STREQUAL "")
a6874708 20 message (STATUS "Warning: TK version has not been specified by CSF_TclTkLibs defining thus it will be used as 8.6")
fb3267c7 21 set (3RDPARTY_TK_LIBRARY_VERSION "8.6")
22 endif()
23endif()
24
fb3267c7 25if (USE_TBB)
26 set (CSF_TBB "tbb tbbmalloc")
27else()
28 set (CSF_TBB)
29endif()
30
31if (WIN32)
32 set (CSF_advapi32 "advapi32.lib")
33 set (CSF_gdi32 "gdi32.lib")
34 set (CSF_user32 "user32.lib")
35 set (CSF_wsock32 "wsock32.lib")
36 set (CSF_AviLibs "ws2_32.lib vfw32.lib")
37 set (CSF_OpenGlLibs "opengl32.lib glu32.lib")
38
39 if (USE_TCL)
40 set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}.lib")
41 set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}.lib")
42 endif()
43
fb3267c7 44else()
45
e713baee 46 if (APPLE)
fb3267c7 47 set (CSF_objc "objc")
48
49 # frameworks
e713baee 50 find_library (Appkit_LIB NAMES Appkit)
51 set (CSF_Appkit ${Appkit_LIB})
52
53 find_library (IOKit_LIB NAMES IOKit)
54 set (CSF_IOKit ${IOKit_LIB})
55
56 OCCT_CHECK_AND_UNSET (Appkit_LIB)
57 OCCT_CHECK_AND_UNSET (IOKit_LIB)
58
59 if (USE_GLX)
60 set (CSF_OpenGlLibs GL)
61 set (CSF_XwLibs "X11 Xext Xmu Xi")
62 else()
63 find_library (OpenGlLibs_LIB NAMES OpenGL)
64 set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
65
66 OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
67 endif()
fb3267c7 68
e713baee 69 if (USE_TCL)
70 set (CSF_TclTkLibs Tk)
71 set (CSF_TclLibs Tcl)
72 endif()
73 elseif (ANDROID)
fb3267c7 74 set (CSF_ThreadLibs "c")
75 set (CSF_OpenGlLibs "EGL GLESv2")
76 elseif (UNIX)
13c7b7a3 77 set (CSF_ThreadLibs "pthread rt stdc++")
fb3267c7 78 set (CSF_OpenGlLibs "GLU GL")
fb3267c7 79 set (CSF_XwLibs "X11 Xext Xmu Xi")
c2c9890c 80 set (CSF_dl "dl")
e713baee 81
82 if (USE_TCL)
83 set (CSF_TclLibs "tcl${3RDPARTY_TCL_LIBRARY_VERSION}")
84 set (CSF_TclTkLibs "tk${3RDPARTY_TK_LIBRARY_VERSION}")
85 endif()
fb3267c7 86 endif()
87
88 if (USE_FREETYPE)
89 set (CSF_FREETYPE "freetype")
90 else()
91 set (CSF_FREETYPE)
92 endif()
93
94 if (USE_FREEIMAGE)
95 set (CSF_FreeImagePlus "freeimage")
96 else()
97 set (CSF_FreeImagePlus)
98 endif()
99
100 if (NOT DEFINED ANDROID)
101 if (USE_GL2PS)
102 set (CSF_GL2PS "gl2ps")
103 else()
104 set (CSF_GL2PS)
105 endif()
106 endif()
fb3267c7 107endif()