0029409: Configuration, macOS - "Appkit" is spelled in CMake scripts using wrong...
[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 61# GL2PS
62if (NOT DEFINED ANDROID)
eaffb01e 63 if (USE_GL2PS)
4fecc365 64 set (CSF_GL2PS "gl2ps")
eaffb01e
BB
65 else()
66 set (CSF_GL2PS)
67 endif()
4fecc365 68endif()
eaffb01e 69
4fecc365 70if (WIN32)
71 set (CSF_advapi32 "advapi32.lib")
72 set (CSF_gdi32 "gdi32.lib")
73 set (CSF_user32 "user32.lib")
74 set (CSF_wsock32 "wsock32.lib")
75 set (CSF_psapi "Psapi.lib")
2c26e60b 76 set (CSF_d3d9 "D3D9.lib")
4fecc365 77 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
78 set (CSF_OpenGlLibs "libEGL libGLESv2")
7c65581d 79 else()
4fecc365 80 set (CSF_OpenGlLibs "opengl32.lib")
fb3267c7 81 endif()
82
4fecc365 83 else()
fb3267c7 84
e713baee 85 if (APPLE)
fb3267c7 86 set (CSF_objc "objc")
87
88 # frameworks
2c3f1a57 89 find_library (Appkit_LIB NAMES AppKit)
e713baee 90 set (CSF_Appkit ${Appkit_LIB})
91
92 find_library (IOKit_LIB NAMES IOKit)
93 set (CSF_IOKit ${IOKit_LIB})
94
95 OCCT_CHECK_AND_UNSET (Appkit_LIB)
96 OCCT_CHECK_AND_UNSET (IOKit_LIB)
97
98 if (USE_GLX)
99 set (CSF_OpenGlLibs GL)
100 set (CSF_XwLibs "X11 Xext Xmu Xi")
101 else()
102 find_library (OpenGlLibs_LIB NAMES OpenGL)
103 set (CSF_OpenGlLibs ${OpenGlLibs_LIB})
104
105 OCCT_CHECK_AND_UNSET (OpenGlLibs_LIB)
106 endif()
fb3267c7 107
e713baee 108 elseif (ANDROID)
fb3267c7 109 set (CSF_ThreadLibs "c")
110 set (CSF_OpenGlLibs "EGL GLESv2")
111 elseif (UNIX)
13c7b7a3 112 set (CSF_ThreadLibs "pthread rt stdc++")
8cea17de 113 set (CSF_OpenGlLibs "GL")
fb3267c7 114 set (CSF_XwLibs "X11 Xext Xmu Xi")
c2c9890c 115 set (CSF_dl "dl")
fb3267c7 116 endif()
4fecc365 117endif()