0029520: Visualization - drop deprecated V3d_View::Export() functionality and depende...
[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
4fecc365 13# TBB
fb3267c7 14if (USE_TBB)
15 set (CSF_TBB "tbb tbbmalloc")
16else()
17 set (CSF_TBB)
18endif()
19
4fecc365 20# FREETYPE
21if (USE_FREETYPE)
22 set (CSF_FREETYPE "freetype")
23else()
24 set (CSF_FREETYPE)
25endif()
fb3267c7 26
08f8a185 27# FFmpeg
28if (USE_FFMPEG)
29 set (CSF_FFmpeg "avcodec avformat swscale avutil")
30else()
31 set (CSF_FFmpeg)
32endif()
33
4fecc365 34# FREEIMAGE
35if (USE_FREEIMAGE)
36 set (CSF_FreeImagePlus "freeimage")
37else()
a975e06e 38 if (WIN32)
39 set (CSF_FreeImagePlus "windowscodecs")
40 else()
41 set (CSF_FreeImagePlus)
42 endif()
4fecc365 43endif()
44
45# TCL/TK
46if (USE_TCL)
47 if (WIN32)
d51a0ff6 48 set (CSF_TclLibs "tcl86")
49 set (CSF_TclTkLibs "tk86")
7c65581d 50 else()
4fecc365 51 if(APPLE)
52 set (CSF_TclTkLibs Tk)
53 set (CSF_TclLibs Tcl)
54 elseif(UNIX)
55 set (CSF_TclLibs "tcl8.6")
56 set (CSF_TclTkLibs "tk8.6")
57 endif()
7c65581d 58 endif()
4fecc365 59endif()
7c65581d 60
4fecc365 61if (WIN32)
62 set (CSF_advapi32 "advapi32.lib")
63 set (CSF_gdi32 "gdi32.lib")
64 set (CSF_user32 "user32.lib")
65 set (CSF_wsock32 "wsock32.lib")
66 set (CSF_psapi "Psapi.lib")
2c26e60b 67 set (CSF_d3d9 "D3D9.lib")
4fecc365 68 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
69 set (CSF_OpenGlLibs "libEGL libGLESv2")
7c65581d 70 else()
4fecc365 71 set (CSF_OpenGlLibs "opengl32.lib")
fb3267c7 72 endif()
73
4fecc365 74 else()
fb3267c7 75
e713baee 76 if (APPLE)
fb3267c7 77 set (CSF_objc "objc")
78
79 # frameworks
2c3f1a57 80 find_library (Appkit_LIB NAMES AppKit)
e713baee 81 set (CSF_Appkit ${Appkit_LIB})
82
83 find_library (IOKit_LIB NAMES IOKit)
84 set (CSF_IOKit ${IOKit_LIB})
85
86 OCCT_CHECK_AND_UNSET (Appkit_LIB)
87 OCCT_CHECK_AND_UNSET (IOKit_LIB)
88
89 if (USE_GLX)
90 set (CSF_OpenGlLibs GL)
91 set (CSF_XwLibs "X11 Xext Xmu Xi")
92 else()
93 find_library (OpenGlLibs_LIB NAMES OpenGL)
94 set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
95
96 OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
97 endif()
fb3267c7 98
e713baee 99 elseif (ANDROID)
fb3267c7 100 set (CSF_ThreadLibs "c")
101 set (CSF_OpenGlLibs "EGL GLESv2")
102 elseif (UNIX)
13c7b7a3 103 set (CSF_ThreadLibs "pthread rt stdc++")
8bf738e6 104 if (USE_GLES2)
105 set (CSF_OpenGlLibs "EGL GLESv2")
106 else()
107 set (CSF_OpenGlLibs "GL")
108 endif()
fb3267c7 109 set (CSF_XwLibs "X11 Xext Xmu Xi")
c2c9890c 110 set (CSF_dl "dl")
fb3267c7 111 endif()
4fecc365 112endif()