forked from sylefeb/LibSL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libsl-config.cmake
executable file
·575 lines (509 loc) · 19.7 KB
/
libsl-config.cmake
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# Check for Win64 first
# IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
# SET(DX_ARCHITECTURE "x64")
# ELSEIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
# SET(DX_ARCHITECTURE "x86")
# ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
MESSAGE(STATUS "libsl-config.cmake")
OPTION(LIBSL_USE_GLUX "Use gluX with LibSL_gl" ON) # TODO FIXME read this from libsl config
################################################################################
IF (NOT LibSL_DIR)
FIND_PATH(LibSL_DIR
NAMES
CREDITS.txt libsl-config.cmake
HINTS
ENV LibSL_DIR
ENV LIBSL_DIR
PATHS
~/LIBRARIES/LibSL/
~/LibSL
./LibSL
)
ENDIF ()
file(TO_CMAKE_PATH ${LibSL_DIR} LibSL_DIR)
IF (NOT DEFINED ENABLE_LIBARCHIVE)
SET (ENABLE_LIBARCHIVE FALSE)
ENDIF ()
################################################################################
SET(LIBSL_LIBRARY_DIR ${LibSL_DIR}/lib)
SET(LIBSL_INCLUDE_DIR
${LibSL_DIR}/src
${LibSL_DIR}/src/LibSL
${LibSL_DIR}/src/libs/src
${LibSL_DIR}/src/libs/src/loki/include
${LibSL_DIR}/src/libs/src/tclap/include
${LibSL_DIR}/src/libs/src/glux/src
${LibSL_DIR}/src/libs/src/png
${LibSL_DIR}/src/libs/src/jpeg
${LibSL_DIR}/src/libs/src/zlib
${LibSL_DIR}/src/libs/src/newmat
${LibSL_DIR}/src/libs/src/tinyxml
${LibSL_DIR}/src/libs/src/anttweakbar/include
${LibSL_DIR}/src/libs/src/OpenNL/src
${LibSL_DIR}/src/libs/bin/win32/TAUCS/include
${LibSL_DIR}/src/libs/src/SQLite/
${LibSL_DIR}/src/libs/src/hashlibpp/src/
${LibSL_DIR}/src/libs/src/rply/
$ENV{DXSDK_DIR}/include
$ENV{DXSDK_DIR}/lib/x86
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core)
IF (WIN32)
FIND_LIBRARY(LIBSL_LIBRARY LibSL.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_LIBRARY_D LibSL-d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL_LIBRARY LibSL_gl.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL_LIBRARY_D LibSL_gl-d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL4_LIBRARY LibSL_gl4.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL4_LIBRARY_D LibSL_gl4-d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_LINALG_LIBRARY LibSL_linalg.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_LINALG_LIBRARY_D LibSL_linalg-d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX9_LIBRARY LibSL_d3d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX9_LIBRARY_D LibSL_d3d-d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX10_LIBRARY LibSL_dx10.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX10_LIBRARY_D LibSL_dx10-d.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_SHARPBINDER_LIBRARY LibSL_sharp_binder.lib PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_SHARPBINDER_LIBRARY_D LibSL_sharp_binder-d.lib PATHS ${LIBSL_LIBRARY_DIR})
# SET(TAUCS_LIB_DIR ${LibSL_DIR}/src/libs/bin/win32/TAUCS/lib)
# SET(TAUCS_LIBS "${TAUCS_LIB_DIR}/libatlas.lib;${TAUCS_LIB_DIR}/libcblas.lib;${TAUCS_LIB_DIR}/libf77blas.lib;${TAUCS_LIB_DIR}/liblapack.lib;${TAUCS_LIB_DIR}/libmetis.lib;${TAUCS_LIB_DIR}/vcf2c.lib;${TAUCS_LIB_DIR}/libtaucs.lib")
ELSE (WIN32)
FIND_LIBRARY(LIBSL_LIBRARY libLibSL.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_LIBRARY_D libLibSL-d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL_LIBRARY libLibSL_gl.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL_LIBRARY_D libLibSL_gl-d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL4_LIBRARY libLibSL_gl4.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_GL4_LIBRARY_D libLibSL_gl4-d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_LINALG_LIBRARY LibSL_linalg.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_LINALG_LIBRARY_D LibSL_linalg-d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX9_LIBRARY libLibSL_d3d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX9_LIBRARY_D libLibSL_d3d-d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX10_LIBRARY libLibSL_d3d.a PATHS ${LIBSL_LIBRARY_DIR})
FIND_LIBRARY(LIBSL_DX10_LIBRARY_D libLibSL_d3d-d.a PATHS ${LIBSL_LIBRARY_DIR})
ENDIF (WIN32)
################################################################################
IF(NOT APPLE)
IF (LIBSL_USE_GLUX)
ADD_DEFINITIONS(-DUSE_GLUX)
IF(NOT WIN32)
ADD_DEFINITIONS(-DGL_ARB_multitexture=1) # hack due to MESA headers including ARB_multitexture
ENDIF(NOT WIN32)
ENDIF (LIBSL_USE_GLUX)
ENDIF(NOT APPLE)
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
ADD_DEFINITIONS(-DTW_STATIC -DTW_NO_LIB_PRAGMA)
Find_Package(OpenGL)
IF (CMAKE_VERSION VERSION_LESS 2.8.0)
# JD: With recent versions of CMake, FindGLU.cmake is basically
# just an alias to FindOpenGL.cmake, so we can omit it safely.
Find_Package(GLU)
ENDIF ()
Find_Package(GLUT)
################################################################################
IF (WIN32)
########################################
SET(LIBSL_LIBRARIES
optimized ${LIBSL_LIBRARY_DIR}/LibSL.lib
optimized ${LIBSL_LIBRARY_DIR}/jpeg.lib
optimized ${LIBSL_LIBRARY_DIR}/png.lib
optimized ${LIBSL_LIBRARY_DIR}/zlib.lib
optimized ${LIBSL_LIBRARY_DIR}/loki.lib
optimized ${LIBSL_LIBRARY_DIR}/3ds.lib
optimized ${LIBSL_LIBRARY_DIR}/tinyxml.lib
optimized ${LIBSL_LIBRARY_DIR}/hashlibpp.lib
optimized ${LIBSL_LIBRARY_DIR}/qhull.lib
debug ${LIBSL_LIBRARY_DIR}/LibSL-d.lib
debug ${LIBSL_LIBRARY_DIR}/jpeg-d.lib
debug ${LIBSL_LIBRARY_DIR}/png-d.lib
debug ${LIBSL_LIBRARY_DIR}/zlib-d.lib
debug ${LIBSL_LIBRARY_DIR}/loki-d.lib
debug ${LIBSL_LIBRARY_DIR}/3ds-d.lib
debug ${LIBSL_LIBRARY_DIR}/tinyxml-d.lib
debug ${LIBSL_LIBRARY_DIR}/hashlibpp-d.lib
debug ${LIBSL_LIBRARY_DIR}/qhull-d.lib
winmm.lib
psapi.lib
shlwapi.lib
)
########################################
IF (NOT TARGET LibSL)
ADD_LIBRARY(LibSL STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL PROPERTY IMPORTED_LOCATION_DEBUG
${LIBSL_LIBRARY_DIR}/LibSL-d.lib)
SET_PROPERTY(TARGET LibSL PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
${LIBSL_LIBRARY_DIR}/jpeg-d.lib
${LIBSL_LIBRARY_DIR}/png-d.lib
${LIBSL_LIBRARY_DIR}/zlib-d.lib
${LIBSL_LIBRARY_DIR}/loki-d.lib
${LIBSL_LIBRARY_DIR}/3ds-d.lib
${LIBSL_LIBRARY_DIR}/tinyxml-d.lib
${LIBSL_LIBRARY_DIR}/hashlibpp-d.lib
${LIBSL_LIBRARY_DIR}/qhull-d.lib
winmm.lib
psapi.lib
shlwapi.lib
)
SET_PROPERTY(TARGET LibSL PROPERTY IMPORTED_LOCATION_RELEASE
${LIBSL_LIBRARY_DIR}/LibSL.lib)
SET_PROPERTY(TARGET LibSL PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
${LIBSL_LIBRARY_DIR}/jpeg.lib
${LIBSL_LIBRARY_DIR}/png.lib
${LIBSL_LIBRARY_DIR}/zlib.lib
${LIBSL_LIBRARY_DIR}/loki.lib
${LIBSL_LIBRARY_DIR}/3ds.lib
${LIBSL_LIBRARY_DIR}/tinyxml.lib
${LIBSL_LIBRARY_DIR}/hashlibpp.lib
${LIBSL_LIBRARY_DIR}/qhull.lib
winmm.lib
psapi.lib
shlwapi.lib
)
# SET_PROPERTY(TARGET LibSL PROPERTY INTERFACE_COMPILE_DEFINITIONS
# UNICODE
# _UNICODE
# )
SET_PROPERTY(TARGET LibSL PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${LibSL_DIR}/src
${LibSL_DIR}/src/LibSL
${LibSL_DIR}/src/libs/src
${LibSL_DIR}/src/libs/src/loki/include
${LibSL_DIR}/src/libs/src/tclap/include
${LibSL_DIR}/src/libs/src/glux/src
${LibSL_DIR}/src/libs/src/png
${LibSL_DIR}/src/libs/src/jpeg
${LibSL_DIR}/src/libs/src/zlib
${LibSL_DIR}/src/libs/src/newmat
${LibSL_DIR}/src/libs/src/tinyxml
${LibSL_DIR}/src/libs/src/anttweakbar/include
${LibSL_DIR}/src/libs/src/OpenNL/src
${LibSL_DIR}/src/libs/bin/win32/TAUCS/include
${LibSL_DIR}/src/libs/src/SQLite/
${LibSL_DIR}/src/libs/src/hashlibpp/src/
)
ENDIF()
########################################
SET(LIBSL_GL_LIBRARIES
optimized ${LIBSL_LIBRARY_DIR}/LibSL_gl.lib
optimized ${LIBSL_LIBRARY_DIR}/AntTweakBar.lib
optimized ${LIBSL_LIBRARY_DIR}/glux.lib
debug ${LIBSL_LIBRARY_DIR}/LibSL_gl-d.lib
debug ${LIBSL_LIBRARY_DIR}/glux-d.lib
debug ${LIBSL_LIBRARY_DIR}/AntTweakBar-d.lib
${OPENGL_LIBRARIES}
${GLU_LIBRARIES}
)
########################################
IF (NOT TARGET LibSL_gl)
ADD_LIBRARY(LibSL_gl STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LOCATION_DEBUG
${LIBSL_LIBRARY_DIR}/LibSL_gl-d.lib)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
${LIBSL_LIBRARY_DIR}/glux-d.lib
${LIBSL_LIBRARY_DIR}/AntTweakBar-d.lib
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES}
)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LOCATION_RELEASE
${LIBSL_LIBRARY_DIR}/LibSL_gl.lib)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
${LIBSL_LIBRARY_DIR}/glux.lib
${LIBSL_LIBRARY_DIR}/AntTweakBar.lib
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES}
)
SET_PROPERTY(TARGET LibSL_gl PROPERTY INTERFACE_COMPILE_DEFINITIONS
OPENGL
TW_STATIC
TW_NO_LIB_PRAGMA
)
ENDIF()
########################################
SET(LIBSL_GL4_LIBRARIES
optimized ${LIBSL_LIBRARY_DIR}/LibSL_gl4.lib
optimized ${LIBSL_LIBRARY_DIR}/AntTweakBar.lib
optimized ${LIBSL_LIBRARY_DIR}/glux.lib
debug ${LIBSL_LIBRARY_DIR}/LibSL_gl4-d.lib
debug ${LIBSL_LIBRARY_DIR}/glux-d.lib
debug ${LIBSL_LIBRARY_DIR}/AntTweakBar-d.lib
${OPENGL_LIBRARIES}
${GLU_LIBRARIES}
)
########################################
IF (NOT TARGET LibSL_gl4)
ADD_LIBRARY(LibSL_gl4 STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY IMPORTED_LOCATION_DEBUG
${LIBSL_LIBRARY_DIR}/LibSL_gl4-d.lib)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
${LIBSL_LIBRARY_DIR}/glux-d.lib
${LIBSL_LIBRARY_DIR}/AntTweakBar-d.lib
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES}
)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY IMPORTED_LOCATION_RELEASE
${LIBSL_LIBRARY_DIR}/LibSL_gl4.lib)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
${LIBSL_LIBRARY_DIR}/glux.lib
${LIBSL_LIBRARY_DIR}/AntTweakBar.lib
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES}
)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY INTERFACE_COMPILE_DEFINITIONS
OPENGL
OPENGL4
TW_STATIC
TW_NO_LIB_PRAGMA
)
ENDIF()
########################################
SET(LIBSL_LINALG_LIBRARIES
optimized ${LIBSL_LIBRARY_DIR}/LibSL_linalg.lib
optimized ${LIBSL_LIBRARY_DIR}/nl.lib
optimized ${LIBSL_LIBRARY_DIR}/newmat.lib
debug ${LIBSL_LIBRARY_DIR}/LibSL_linalg-d.lib
debug ${LIBSL_LIBRARY_DIR}/nl-d.lib
debug ${LIBSL_LIBRARY_DIR}/newmat-d.lib
${TAUCS_LIBS}
)
########################################
IF (NOT TARGET LibSL_linalg)
ADD_LIBRARY(LibSL_linalg STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_linalg PROPERTY IMPORTED_LOCATION_DEBUG
${LIBSL_LIBRARY_DIR}/LibSL_linalg-d.lib)
SET_PROPERTY(TARGET LibSL_linalg PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
${LIBSL_LIBRARY_DIR}/nl-d.lib
${LIBSL_LIBRARY_DIR}/newmat-d.lib
)
SET_PROPERTY(TARGET LibSL_linalg PROPERTY IMPORTED_LOCATION_RELEASE
${LIBSL_LIBRARY_DIR}/LibSL_linalg.lib)
SET_PROPERTY(TARGET LibSL_linalg PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
${LIBSL_LIBRARY_DIR}/nl.lib
${LIBSL_LIBRARY_DIR}/newmat.lib
)
ENDIF()
########################################
SET(LIBSL_DX9_LIBRARIES
optimized ${LIBSL_LIBRARY_DIR}/LibSL_d3d.lib
debug ${LIBSL_LIBRARY_DIR}/LibSL_d3d-d.lib
$ENV{DXSDK_DIR}/lib/x86/d3d9.lib
$ENV{DXSDK_DIR}/lib/x86/d3dx9.lib
$ENV{DXSDK_DIR}/lib/x86/dxerr.lib
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/Release/dxut.lib
comctl32.lib
)
########################################
IF (NOT TARGET LibSL_sharp_binder)
ADD_LIBRARY(LibSL_sharp_binder STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_sharp_binder PROPERTY IMPORTED_LOCATION_DEBUG ${LIBSL_LIBRARY_DIR}/LibSL_sharp_binder-d.lib)
SET_PROPERTY(TARGET LibSL_sharp_binder PROPERTY IMPORTED_LOCATION_RELEASE ${LIBSL_LIBRARY_DIR}/LibSL_sharp_binder.lib)
SET_PROPERTY(TARGET LibSL_sharp_binder PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${LibSL_DIR}/src/LibSL_sharp/GLPanel/C++/
)
ENDIF()
########################################
IF (NOT TARGET LibSL_d3d)
ADD_LIBRARY(LibSL_d3d STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_d3d PROPERTY IMPORTED_LOCATION_DEBUG
${LIBSL_LIBRARY_DIR}/LibSL_d3d-d.lib)
SET_PROPERTY(TARGET LibSL_d3d PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
$ENV{DXSDK_DIR}/lib/x86/d3d9.lib
$ENV{DXSDK_DIR}/lib/x86/d3dx9.lib
$ENV{DXSDK_DIR}/lib/x86/dxerr.lib
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/Release/dxut.lib
comctl32.lib
)
SET_PROPERTY(TARGET LibSL_d3d PROPERTY IMPORTED_LOCATION_RELEASE
${LIBSL_LIBRARY_DIR}/LibSL_d3d.lib)
SET_PROPERTY(TARGET LibSL_d3d PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
$ENV{DXSDK_DIR}/lib/x86/d3d9.lib
$ENV{DXSDK_DIR}/lib/x86/d3dx9.lib
$ENV{DXSDK_DIR}/lib/x86/dxerr.lib
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/Release/dxut.lib
comctl32.lib
)
# SET_PROPERTY(TARGET LibSL_d3d PROPERTY COMPILE_DEFINITIONS
# UNICODE
# _UNICODE
# )
SET_PROPERTY(TARGET LibSL_d3d PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$ENV{DXSDK_DIR}/Include
$ENV{DXSDK_DIR}/lib/x86
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/
)
ENDIF()
########################################
SET(LIBSL_DX10_LIBRARIES
optimized ${LIBSL_LIBRARY_DIR}/LibSL_dx10.lib
debug ${LIBSL_LIBRARY_DIR}/LibSL_dx10.lib
$ENV{DXSDK_DIR}/lib/x86/d3d11.lib
$ENV{DXSDK_DIR}/lib/x86/d3dx11.lib
$ENV{DXSDK_DIR}/lib/x86/dxerr.lib
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/Release/dxut.lib
comctl32.lib
)
########################################
IF (NOT TARGET LibSL_dx10)
ADD_LIBRARY(LibSL_dx10 STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_dx10 PROPERTY IMPORTED_LOCATION_DEBUG
${LIBSL_LIBRARY_DIR}/LibSL_dx10-d.lib)
SET_PROPERTY(TARGET LibSL_dx10 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
$ENV{DXSDK_DIR}/lib/x86/d3d11.lib
$ENV{DXSDK_DIR}/lib/x86/d3dx11.lib
$ENV{DXSDK_DIR}/lib/x86/dxerr.lib
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/Release/dxut.lib
comctl32.lib
)
SET_PROPERTY(TARGET LibSL_dx10 PROPERTY IMPORTED_LOCATION_RELEASE
${LIBSL_LIBRARY_DIR}/LibSL_dx10.lib)
SET_PROPERTY(TARGET LibSL_dx10 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
$ENV{DXSDK_DIR}/lib/x86/d3d11.lib
$ENV{DXSDK_DIR}/lib/x86/d3dx11.lib
$ENV{DXSDK_DIR}/lib/x86/dxerr.lib
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/Release/dxut.lib
comctl32.lib
)
# SET_PROPERTY(TARGET LibSL_dx10 PROPERTY COMPILE_DEFINITIONS
# UNICODE
# _UNICODE
# )
SET_PROPERTY(TARGET LibSL_dx10 PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$ENV{DXSDK_DIR}/Include
$ENV{DXSDK_DIR}/lib/x86
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/
)
ENDIF()
########################################
SET(LIBSL_DX9_INCLUDE_DIR
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/
$ENV{DXSDK_DIR}/Include)
SET(LIBSL_DX10_INCLUDE_DIR
$ENV{DXSDK_DIR}/Samples/C++/DXUT/Core/
$ENV{DXSDK_DIR}/Include)
ADD_DEFINITIONS(-D_UNICODE -DUNICODE)
################################################################################
ELSE (WIN32)
include(FindGLUT)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
########################################
SET(LIBSL_LIBRARIES "${LIBSL_LIBRARY_DIR}/libLibSL.a;${LIBSL_LIBRARY_DIR}/libjpeg.a;${LIBSL_LIBRARY_DIR}/libpng.a;${LIBSL_LIBRARY_DIR}/libzlib.a;${LIBSL_LIBRARY_DIR}/libloki.a;${LIBSL_LIBRARY_DIR}/lib3ds.a;${LIBSL_LIBRARY_DIR}/libtinyxml.a;${LIBSL_LIBRARY_DIR}/libhashlibpp.a;${LIBSL_LIBRARY_DIR}/libqhull.a")
SET(LIBSL_GL_LIBRARIES "${LIBSL_LIBRARY_DIR}/libLibSL_gl.a;${LIBSL_LIBRARY_DIR}/libglux.a;${LIBSL_LIBRARY_DIR}/libAntTweakBar.a" ${OPENGL_LIBRARIES} ${GLU_LIBRARIES} ${GLUT_LIBRARIES})
SET(LIBSL_GL4_LIBRARIES "${LIBSL_LIBRARY_DIR}/libLibSL_gl4.a;${LIBSL_LIBRARY_DIR}/libglux.a;${LIBSL_LIBRARY_DIR}/libAntTweakBar.a" ${OPENGL_LIBRARIES} ${GLU_LIBRARIES} ${GLUT_LIBRARIES})
SET(LIBSL_LINALG_LIBRARIES "${LIBSL_LIBRARY_DIR}/libLibSL_linalg.a;${LIBSL_LIBRARY_DIR}/libnl.a")
########################################
IF (NOT TARGET LibSL)
ADD_LIBRARY(LibSL STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL PROPERTY IMPORTED_LOCATION
${LIBSL_LIBRARY_DIR}/libLibSL.a)
SET_PROPERTY(TARGET LibSL PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES
${LIBSL_LIBRARY_DIR}/libjpeg.a
${LIBSL_LIBRARY_DIR}/libpng.a
${LIBSL_LIBRARY_DIR}/libzlib.a
${LIBSL_LIBRARY_DIR}/libloki.a
${LIBSL_LIBRARY_DIR}/lib3ds.a
${LIBSL_LIBRARY_DIR}/libtinyxml.a
${LIBSL_LIBRARY_DIR}/libhashlibpp.a
${LIBSL_LIBRARY_DIR}/libqhull.a
)
SET_PROPERTY(TARGET LibSL PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${LibSL_DIR}/src
${LibSL_DIR}/src/LibSL
${LibSL_DIR}/src/libs/src
${LibSL_DIR}/src/libs/src/loki/include
${LibSL_DIR}/src/libs/src/tclap/include
${LibSL_DIR}/src/libs/src/glux/src
${LibSL_DIR}/src/libs/src/png
${LibSL_DIR}/src/libs/src/jpeg
${LibSL_DIR}/src/libs/src/zlib
${LibSL_DIR}/src/libs/src/newmat
${LibSL_DIR}/src/libs/src/tinyxml
${LibSL_DIR}/src/libs/src/anttweakbar/include
${LibSL_DIR}/src/libs/src/OpenNL/src
${LibSL_DIR}/src/libs/bin/win32/TAUCS/include
${LibSL_DIR}/src/libs/src/SQLite/
${LibSL_DIR}/src/libs/src/hashlibpp/src/
)
ENDIF()
########################################
IF (NOT TARGET AntTweakBar)
ADD_LIBRARY(AntTweakBar STATIC IMPORTED)
IF (NOT EMSCRIPTEN)
FIND_PACKAGE(X11 REQUIRED)
ENDIF (NOT EMSCRIPTEN)
SET_PROPERTY(TARGET AntTweakBar PROPERTY IMPORTED_LOCATION
${LIBSL_LIBRARY_DIR}/libAntTweakBar.a)
SET_PROPERTY(TARGET AntTweakBar PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES
${OPENGL_LIBRARIES}
${X11_LIBRARIES}
)
#IF(APPLE)
# ADD_DEFINITIONS(-D_MACOSX)
# ADD_DEFINITIONS(-D__PLACEMENT_NEW_INLINE)
# SET_TARGET_PROPERTIES(AntTweakBar PROPERTIES INTERFACE_COMPILE_DEFINITIONS "-O3 -arch i386 -arch x86_64 -fno-strict-aliasing -ObjC++")
#ELSE(APPLE)
# SET_TARGET_PROPERTIES(AntTweakBar PROPERTIES INTERFACE_COMPILE_DEFINITIONS "-O3 -D_UNIX -D__PLACEMENT_NEW_INLINE")
#ENDIF(APPLE)
ENDIF ()
########################################
IF (NOT TARGET LibSL_gl)
ADD_LIBRARY(LibSL_gl STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LOCATION ${LIBSL_LIBRARY_DIR}/libLibSL_gl.a)
IF (NOT EMSCRIPTEN)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES
LibSL
AntTweakBar
${LIBSL_LIBRARY_DIR}/libglux.a
${OPENGL_LIBRARIES}
${GLU_LIBRARIES}
${GLUT_LIBRARIES}
)
ELSE (NOT EMSCRIPTEN)
SET_PROPERTY(TARGET LibSL_gl PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES
LibSL
${OPENGL_LIBRARIES}
${GLU_LIBRARIES}
${GLUT_LIBRARIES}
)
ENDIF (NOT EMSCRIPTEN)
SET_PROPERTY(TARGET LibSL_gl PROPERTY INTERFACE_COMPILE_DEFINITIONS
OPENGL
TW_STATIC
TW_NO_LIB_PRAGMA
)
ENDIF()
########################################
IF (NOT TARGET LibSL_gl4)
ADD_LIBRARY(LibSL_gl4 STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY IMPORTED_LOCATION
${LIBSL_LIBRARY_DIR}/libLibSL_gl4.a)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES
LibSL
AntTweakBar
${LIBSL_LIBRARY_DIR}/libglux.a
${OPENGL_LIBRARIES}
${GLU_LIBRARIES}
${GLUT_LIBRARIES}
)
SET_PROPERTY(TARGET LibSL_gl4 PROPERTY INTERFACE_COMPILE_DEFINITIONS
OPENGL
OPENGL4
USE_GLUT
TW_STATIC
TW_NO_LIB_PRAGMA
)
ENDIF()
########################################
IF (NOT TARGET LibSL_linalg)
ADD_LIBRARY(LibSL_linalg STATIC IMPORTED)
SET_PROPERTY(TARGET LibSL_linalg PROPERTY IMPORTED_LOCATION
${LIBSL_LIBRARY_DIR}/libLibSL_linalg.a)
SET_PROPERTY(TARGET LibSL_linalg PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES
${LIBSL_LIBRARY_DIR}/libnl.a
)
ENDIF()
ENDIF (WIN32)
########################################
IF (ENABLE_LIBARCHIVE)
IF (NOT TARGET archive_static)
ADD_SUBDIRECTORY(${LibSL_DIR}/src/libs/src/libarchive libsl/libarchive)
ENDIF ()
ENDIF ()
################################################################################
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSL DEFAULT_MSG LIBSL_LIBRARIES LIBSL_INCLUDE_DIR)
INCLUDE(${LibSL_DIR}/src/tools/autobindshader/AutoBindShader.cmake)