/
SqueakUnixConfig.class.st
1338 lines (1073 loc) · 50.2 KB
/
SqueakUnixConfig.class.st
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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"
A SqueakUnixConfig is a top level configuration for *nix configuratons.
My immediate sub-classes are Abstract Base classes for specific *nix variants.
The sub-classes of my Abstract Base Classes are concrete configurations of the form
[Operating System] [WordSize] [Processor Language][VM MemoryManager][BuildType]Conf
I am not meant to be built.
HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
"
Class {
#name : #SqueakUnixConfig,
#superclass : #CPlatformConfigForSqueak,
#category : #CMakeVMMakerSqueak
}
{ #category : #nil }
SqueakUnixConfig class >> vmConfigCmake [
"move the CXX_FLAGS out later
"
^'
IF (NOT DEFINED __sq_config_h)
SET(__sq_config_h 1)
CONFIG_DEFINE(__sq_config_h)
SET (OS_TYPE \"unix\")
CONFIG_DEFINE (OS_TYPE)
SET (version \"1.2.3.4\")
SET (without_gl "")
STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\1" major ${version})
STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\2" minor ${version})
STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\3" patch ${version})
STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\4" release ${version})
IF (CMAKE_COMPILER_IS_GNUCC)
SET (interp gnu-interp)
ELSE ()
SET (interp interp)
MESSAGE ("!! Cannot optimise interpreter performance for GCC")
ENDIF (CMAKE_COMPILER_IS_GNUCC)
#LIBRARIES
#define HAVE_LANGINFO_CODESET 1
#define TIME_WITH_SYS_TIME 1
CHECK_LIBRARY_EXISTS (dl dlopen "" HAVE_LIBDL)
IF (HAVE_LIBDL)
CONFIG_DEFINE(HAVE_LIBDL)
ENDIF (HAVE_LIBDL)
#HEADERS
check_include_file("unistd.h" HAVE_UNISTD_H)
if(HAVE_UNISTD_H)
CONFIG_DEFINE(HAVE_UNISTD_H)
endif()
check_include_file("dirent.h" HAVE_DIRENT_H)
if(HAVE_DIRENT_H)
CONFIG_DEFINE(HAVE_DIRENT_H)
endif()
check_include_file("pty.h" HAVE_PTY_H)
if(HAVE_PTY_H)
CONFIG_DEFINE(HAVE_PTY_H)
endif()
check_include_file("stropts.h" HAVE_STROPTS_H)
if(HAVE_STROPTS_H)
CONFIG_DEFINE(HAVE_STROPTS_H)
endif()
#PACKAGES
FIND_PACKAGE (X11)
IF (X11_FOUND)
LIST (REMOVE_DUPLICATES X11_INCLUDE_DIR)
SET(USE_X11 1)
CONFIG_DEFINE(USE_X11)
ENDIF ()
message("without-gl = ${without_gl}")
IF (NOT without-gl)
FIND_PACKAGE (OpenGL)
LIST (REMOVE_DUPLICATES OPENGL_INCLUDE_DIR)
ENDIF ()
IF (NOT OPENGL_FOUND)
SET (OPENGL_INCLUDE_DIR "")
ENDIF ()
MESSAGE("OPENGL variables:")
FOREACH (var AGL_FOUND AGL_INCLUDE_DIR AGL_LIBRARIES OPENGL_FOUND OPENGL_INCLUDE_DIR OPENGL_LIBRARIES)
MESSAGE ("${var} = ${${var}}")
ENDFOREACH ()
TEST_BIG_ENDIAN (WORDS_BIGENDIAN)
IF (WORDS_BIGENDIAN)
SET (MSB_FIRST 1)
ELSE ()
SET (LSB_FIRST 1)
ENDIF ()
CONFIG_DEFINE (WORDS_BIGENDIAN)
CONFIG_DEFINE (LSB_FIRST)
CONFIG_DEFINE (MSB_FIRST)
CHECK_FUNCTION_EXISTS (atexit HAVE_ATEXIT)
CHECK_FUNCTION_EXISTS (on_exit HAVE_ON_EXIT)
IF (HAVE_ATEXIT)
SET (AT_EXIT atexit)
ELSEIF (HAVE_ON_EXIT)
SET (AT_EXIT on_exit)
ENDIF ()
CONFIG_DEFINE (AT_EXIT)
MESSAGE("# sqMemoryAccess.h")
CHECK_INCLUDE_FILE (interp.h HAVE_INTERP_H -I${srcVMDir})
CONFIG_DEFINE (HAVE_INTERP_H)
CHECK_TYPE_SIZE (int SIZEOF_INT)
CHECK_TYPE_SIZE (long SIZEOF_LONG)
CHECK_TYPE_SIZE ("long long" SIZEOF_LONG_LONG)
CHECK_TYPE_SIZE ("void *" SIZEOF_VOID_P)
CONFIG_DEFINE (SIZEOF_INT)
CONFIG_DEFINE (SIZEOF_LONG)
CONFIG_DEFINE (SIZEOF_LONG_LONG)
CONFIG_DEFINE (SIZEOF_VOID_P)
TRY_RUN (DOUBLE_WORD_ALIGNMENT tmp ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/testDoubleWordAlignment.c)
TRY_RUN (DOUBLE_WORD_ORDER tmp ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/testDoubleWordOrder.c)
CONFIG_DEFINE (DOUBLE_WORD_ALIGNMENT)
CONFIG_DEFINE (DOUBLE_WORD_ORDER)
MESSAGE("# sqPlatformSpecific.h")
CHECK_INCLUDE_FILE (alloca.h HAVE_ALLOCA_H)
CONFIG_DEFINE (HAVE_ALLOCA_H)
IF (HAVE_ALLOCA_H)
SET (HAVE_ALLOCA 1)
ELSE ()
CHECK_FUNCTION_EXISTS (alloca HAVE_ALLOCA)
ENDIF ()
CONFIG_DEFINE (HAVE_ALLOCA)
MESSAGE("# aio.c")
CHECK_INCLUDE_FILE (sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILE (sys/filio.h HAVE_SYS_FILIO_H)
CONFIG_DEFINE (HAVE_SYS_TIME_H)
CONFIG_DEFINE (HAVE_SYS_FILIO_H)
CHECK_FUNCTION_EXISTS (nanosleep HAVE_NANOSLEEP)
CONFIG_DEFINE (HAVE_NANOSLEEP)
MESSAGE("# sqUnixCharConv.c")
CHECK_INCLUDE_FILE (iconv.h HAVE_ICONV_H)
CHECK_INCLUDE_FILE (langinfo.h HAVE_LANGINFO_H)
IF (HAVE_LANGINFO_H)
TRY_COMPILE (HAVE_LANGINFO_CODESET ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/testLanginfoCodeset.c)
ENDIF (HAVE_LANGINFO_H)
CHECK_LIBRARY_EXISTS (iconv libiconv_open "" HAVE_LIBICONV)
IF (HAVE_LIBICONV)
USE_LIBRARY (iconv)
ENDIF (HAVE_LIBICONV)
CONFIG_DEFINE (HAVE_ICONV_H)
CONFIG_DEFINE (HAVE_LANGINFO_CODESET)
MESSAGE("# sqUnixExternalPrims.c")
CHECK_INCLUDE_FILE (dlfcn.h HAVE_DLFCN_H)
CHECK_LIBRARY_EXISTS (dl dlopen "" HAVE_LIBDL)
IF (HAVE_LIBDL)
USE_LIBRARY (dl)
ENDIF (HAVE_LIBDL)
IF (HAVE_LIBDL)
SET (HAVE_DLOPEN 1)
ELSE ()
CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN)
ENDIF (HAVE_LIBDL)
CHECK_FUNCTION_EXISTS (_dyld_present HAVE_DYLD)
CHECK_FUNCTION_EXISTS (snprintf HAVE_SNPRINTF)
CHECK_FUNCTION_EXISTS (__snprintf HAVE___SNPRINTF)
CONFIG_DEFINE (HAVE_DLFCN_H)
CONFIG_DEFINE (HAVE_DLOPEN)
CONFIG_DEFINE (HAVE_DYLD)
CONFIG_DEFINE (HAVE_SNPRINTF)
CONFIG_DEFINE (HAVE___SNPRINTF)
SET (VM_X11DIR \"${X11_LIBRARY_DIR}\")
CONFIG_DEFINE (VM_X11DIR)
SET (VM_MODULE_PREFIX \"${CMAKE_SHARED_MODULE_PREFIX}\")
CONFIG_DEFINE (VM_MODULE_PREFIX)
SET (CMAKE_SHARED_MODULE_PREFIX "so.")
SET (CMAKE_SHARED_MODULE_SUFFIX "")
SET (MODULE_PREFIX \"${CMAKE_SHARED_MODULE_PREFIX}\")
SET (MODULE_SUFFIX \"${CMAKE_SHARED_MODULE_SUFFIX}\")
SET (LIBRARY_PREFIX \"${CMAKE_SHARED_LIBRARY_PREFIX}\")
SET (LIBRARY_SUFFIX \"${CMAKE_SHARED_LIBRARY_SUFFIX}\")
CONFIG_DEFINE (MODULE_PREFIX)
CONFIG_DEFINE (MODULE_SUFFIX)
CONFIG_DEFINE (LIBRARY_PREFIX)
CONFIG_DEFINE (LIBRARY_SUFFIX)
MESSAGE("# sqUnixMain.c")
SET (VM_BUILD_STRING "\"Unix built on \"__DATE__ \" \"__TIME__\" Compiler: \"__VERSION__")
CONFIG_DEFINE (VM_BUILD_STRING)
SET (VM_LIBDIR "\"${prefix}/${plgdir}\"")
CONFIG_DEFINE (VM_LIBDIR)
SET (VM_HOST \"${VM_HOST}\")
SET (VM_HOST_CPU \"${VM_HOST_CPU}\")
SET (VM_HOST_VENDOR \"${VM_HOST_VENDOR}\")
SET (VM_HOST_OS \"${VM_HOST_OS}\")
CONFIG_DEFINE (VM_HOST)
CONFIG_DEFINE (VM_HOST_CPU)
CONFIG_DEFINE (VM_HOST_VENDOR)
CONFIG_DEFINE (VM_HOST_OS)
SET (VM_VERSION_INFO \"${VM_VERSION}${versionsuffix}\")
SET (VM_VERSION \"${VM_VERSION}\")
SET (PLATFORM_SOURCE_VERSION \"${PLATFORM_SOURCE_VERSION}\")
CONFIG_DEFINE (VM_VERSION)
CONFIG_DEFINE (VM_VERSION_INFO)
CONFIG_DEFINE (PLATFORM_SOURCE_VERSION)
CONFIG_DEFINE (SQ_VERSION)
CHECK_FUNCTION_EXISTS (tzset HAVE_TZSET)
CHECK_VARIABLE_EXISTS (timezone HAVE_TIMEZONE)
CHECK_STRUCT_HAS_MEMBER ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
CONFIG_DEFINE (HAVE_TZSET)
CONFIG_DEFINE (HAVE_TIMEZONE)
CONFIG_DEFINE (HAVE_TM_GMTOFF)
CONFIG_DEFINE (IMAGE_DUMP)
MESSAGE("# sqUnixMemory.c")
CHECK_FUNCTION_EXISTS (mmap HAVE_MMAP)
CONFIG_DEFINE (HAVE_MMAP)
MESSAGE("# OLPC")
IF (NOT without-SUGAR)
SET (SUGAR 1)
ENDIF ()
CONFIG_DEFINE (SUGAR)
IF (DEFINED SQ_VI_BYTES_PER_WORD)
CONFIG_DEFINE (SQ_VI_BYTES_PER_WORD)
ENDIF (DEFINED SQ_VI_BYTES_PER_WORD)
ENDIF (NOT DEFINED __sq_config_h)
'
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> addVMPluginsBuild: aMaker [
"instance variable vmplugins was populated in CPlatformConfigForSqueak>>initialize then customized by >>customizeVMPlugins
That initial customization will probably be the general case.
However, a subclass of me, may want further granularity on included vm plugins based on buildType.
Simply override me (or my addVMPlugins[buildType] cousins) and extract the subset of vmplugins you want to generate.
see the ''hack'' section below.
"
|temp o|
self flag:'tty'. "I am writing sub-directory CMakeLists.txt here. Should I also write the config.cmake files?"
enabledebugmessages
ifTrue: [templates "this message will go to the top level CMakeLists.txt file"
addLast: (CMakeMessage new message: self class name , 'addVMPluginsBuild: aMaker')].
"
hack := the subset of vmplugins that I want for this particular buildType.
hack do:[:vmp| .....
"
vmplugins do:[ :vmp |
o := String new writeStream. "each VMPlugin gets its own CMakeLists.txt file in its own directory"
temp := OrderedCollection new.
temp
addAllLast:((CMakePluginVm new) "this is the CMakeCompositTemplate"
config: self
definitions: (vmp compilerdefinitions)
module: (vmp module)
sources: (vmp sources)
includedirectories: (vmp includedirectories)).
temp do: [:each | o nextPutAll: (each content); cr].
((self buildDir) directoryExists: (vmp module))
ifFalse:[ (self buildDir) createDirectory: (vmp module)].
self write: (o contents) toFile: vmp module , FileDirectory slash , aMaker outputFileName.
templates "this will go to the top level CMakeLists.txt file"
addLast: ((CMakeAddSubDirectory new) sourcedir: (vmp module))
].
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeAddDefinitions [
(enabledebugmessages)
ifTrue:[ templates
addLast:((CMakeMessage new) message: (self class name) , 'cmakeAddDefinitions')
] .
templates
addLast:((CMakeAddDefinitions new) definitions: self compilerDefinitions). "this reroutes to self compilerDefinitionsBuild . This suggests that the cmakeAddDefinitionsBuild is redundant because compileDefinitiosn will rerroute based on buildType"
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeCFlags [
|cflags|
cflags:= String streamContents: [:stream | (self compilerFlags) asStringOn: stream delimiter: ' ' ]. "buildType redirect to compilerFlagsBuildType"
cflags:='"', cflags, '"'.
(enabledebugmessages)
ifTrue:[ templates
addLast:((CMakeMessage new) message: (self class name) , 'cmakeCFlags')
] .
templates
addLast:((CMakeSet new) variable:'CMAKE_C_FLAGS' value: '${CMAKE_C_FLAGS} ', cflags );
addLast:((CMakeSet new) variable:'CMAKE_C_FLAGS_RELEASE' value: '${CMAKE_CXX_FLAGS_RELEASE} ', cflags );
addLast:((CMakeSet new) variable:'CMAKE_C_FLAGS_DEBUG' value: '${CMAKE_CXX_FLAGS_DEBUG} ',cflags);
addLast:((CMakeSet new) variable:'CMAKE_CXX_FLAGS' value: '${CMAKE_CXX_FLAGS} ', cflags );
addLast:((CMakeSet new) variable:'CMAKE_CXX_FLAGS_RELEASE' value: '${CMAKE_CXX_FLAGS_RELEASE} ', cflags );
addLast:((CMakeSet new) variable:'CMAKE_CXX_FLAGS_DEBUG' value: '${CMAKE_CXX_FLAGS_DEBUG} ', cflags ).
(enabledebugmessages) "take a peek at em"
ifTrue:[ templates
addLast:((CMakeMessage new) message: 'CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}');
addLast:((CMakeMessage new) message: 'CMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}');
addLast:((CMakeMessage new) message: 'CMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}');
addLast:((CMakeMessage new) message: 'CMAKE_C_FLAGS=${CMAKE_C_FLAGS}');
addLast:((CMakeMessage new) message: 'CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}');
addLast:((CMakeMessage new) message: 'CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}')
] .
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeIncludeModulesBuild [
"include CMake Modules. on my system they are in /usr/local/share/cmake-3.0/Modules/"
(enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' cmakeIncludeModulesBuild: aMaker')
].
templates
addLast: ((CMakeInclude new) file:'Utils.cmake');
addLast: ((CMakeInclude new) file:'Plugins.cmake');
addLast: ((CMakeInclude new) file:'TestBigEndian');
addLast: ((CMakeInclude new) file:'CheckIncludeFile');
addLast: ((CMakeInclude new) file:'CheckLibraryExists');
addLast: ((CMakeInclude new) file:'CheckTypeSize');
addLast: ((CMakeInclude new) file:'CheckFunctionExists');
addLast: ((CMakeInclude new) file:'CheckVariableExists');
addLast: ((CMakeInclude new) file:'CheckStructHasMember');
addLast: ((CMakeInclude new) file:'FindPkgConfig').
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeIncludePathBuild [
"
cmake --help-variable CMAKE_INCLUDE_PATH
This is used when searching for include files e.g. using the FIND_PATH() command. If you have headers in non-standard locations, it may be useful to set this variable to this directory (e.g. /sw/include on Mac OS X). If you need several directories, separate them by the platform specific separators (e.g. ':' on UNIX) "
(enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' cmakeIncludePathBuild');
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_PATH=${CMAKE_INCLUDE_PATH}')
].
"override me if necessary"
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeLibraryPathBuild [
"
cmake --help-variable CMAKE_LIBRARY_PATH
This is used when searching for libraries e.g. using the FIND_LIBRARY() command. If you have libraries in non-standard locations, it may be useful to set this variable to this directory (e.g. /sw/lib on Mac OS X). If you need several directories, separate them by the platform specific separators (e.g. '':'' on UNIX) " (enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' cmakeLibraryPathBuild');
addLast: ((CMakeMessage new) message: 'CMAKE_LIBRARY_PATH=${CMAKE_LIBRARY_PATH}')
].
"override me if necessary"
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeModulePathBuild [
"
cmake --help-variable CMAKE_LIBRARY_PATH
This is used when searching for libraries e.g. using the FIND_LIBRARY() command. If you have libraries in non-standard locations, it may be useful to set this variable to this directory (e.g. /sw/lib on Mac OS X). If you need several directories, separate them by the platform specific separators (e.g. '':'' on UNIX) " (enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' cmakeModulePathBuild');
addLast: ((CMakeMessage new) message: 'CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}')
].
"override me if necessary"
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakePrefixPathBuild [
"
cmake --help-variable CMAKE_PREFIX_PATH
(since CMake 2.6.0) This is used when searching for include files, binaries, or libraries using either the FIND_PACKAGE(), FIND_PATH(), FIND_PROGRAM(), or FIND_LIBRARY() commands. For each path in the CMAKE_PREFIX_PATH list, CMake will check ''PATH/include'' and ''PATH'' when FIND_PATH() is called, ''PATH/bin'' and ''PATH'' when FIND_PROGRAM() is called, and ''PATH/lib'' and ''PATH'' when FIND_LIBRARY() is called. See the documentation for FIND_PACKAGE(), FIND_LIBRARY(), FIND_PATH(), and FIND_PROGRAM() for more details."
(enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' cmakePrefixPathBuild');
addLast: ((CMakeMessage new) message: 'CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}')
].
"override me if necessary"
]
{ #category : #'cmake buildType redirects' }
SqueakUnixConfig >> cmakeSetSourceFilesProperties [
|cflags|
self flag:'tty: this needs rethinking. It should be a standard template that has different elements injected based on buildType. This should not be a redirectPattern method'.
cflags:=String streamContents: [:stream | (self compilerFlags) asStringOn: stream "compilerFlags redirects based on buildType"
delimiter: ' ' ].
cflags := '"' , cflags , '"'.
(enabledebugmessages)
ifTrue:[ templates
addLast:((CMakeMessage new) message: (self class name) , 'cmakeSetSourceFilesPoperties')
] .
templates
addLast:((CMakeSetSourceFilesProperties new) "this should iterate over a set of sourceFiles that redirects on buildTypes instead of being hard-coded. "
files: (OrderedCollection with: '${srcVMDir}/cogit.c')
propertiesandvalues:{'COMPILE_FLAGS' . cflags});
addLast:((CMakeSetSourceFilesProperties new)
files: (OrderedCollection with: '${targetPlatform}/vm/sqUnixHeartbeat.c')
propertiesandvalues:{'COMPILE_FLAGS' . cflags}).
]
{ #category : #cmake }
SqueakUnixConfig >> cmakeWriteDirectoriesDotCmake: aMaker [
|temp o|
"We could put these inline, but other components include the directories.cmake file. So, we continue that convention"
o := String new writeStream.
temp := OrderedCollection new.
temp
addLast: ((CMakeSet new) variable: 'topDir' quotedValue: (self topDir fullName));
addLast: ((CMakeSet new) variable: 'buildDir' quotedValue: (self buildDir ifNil: ['${topDir}/build'] ifNotNil: [self buildDir fullName]));
addLast: ((CMakeSet new) variable: 'thirdpartyDir' quotedValue: '${buildDir}/thirdParty');
addLast: ((CMakeSet new) variable: 'platformsDir' quotedValue: (self platformsDir pathName));
addLast: ((CMakeSet new) variable: 'srcDir' quotedValue: (self dirSource pathName)); "where the vm source directory lives"
addLast: ((CMakeSet new) variable: 'cogDir' quotedValue: (self cogDir pathName)); "oscogvm/src for historical reasons"
addLast: ((CMakeSet new) variable: 'srcPluginsDir' quotedValue: '${cogDir}/plugins' ); "plugin source directory only in oscogvm/src/plugins"
addLast: ((CMakeSet new) variable: 'srcVMDir' quotedValue: '${srcDir}/vm');
addLast: ((CMakeSet new) variable: 'platformName' quotedValue: (self platformName));
addLast: ((CMakeSet new) variable: 'targetPlatform' quotedValue: '${platformsDir}/${platformName}');
addLast: ((CMakeSet new) variable: 'crossDir' quotedValue: '${platformsDir}/Cross');
addLast: ((CMakeSet new) variable: 'platformVMDir' quotedValue: '${targetPlatform}/vm}');
addLast: ((CMakeSet new) variable: 'outputDir' quotedValue: (self outputDir fullName));
addLast: ((CMakeSet new) variable: 'externalModulesDir' quotedValue: (self externalModulesDir)).
temp do: [:each | o nextPutAll: (each content); cr].
self write: (o contents) toFile: 'directories.cmake'.
(enabledebugmessages)
ifTrue:[
templates
addLast:((CMakeMessage new) message: (self class name), ' setDirectories: aMaker' )
].
templates addLast: ((CMakeInclude new) file: 'directories.cmake').
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configAioC [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'#aio.c');
addLast: ((CMakeCheckIncludeFile new) include:'sys/time.h' variable:'HAVE_SYS_TIME_H');
addLast: ((CMakeCheckIncludeFile new) include:'sys/filio.h' variable:'HAVE_SYS_FILIO_H');
addLast:((CMakeCheckFunctionExists new) function: 'nanosleep' variable: 'HAVE_NANOSLEEP').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configCheckIncludeFileTemplates [
|templates|
templates:= OrderedCollection new.
templates
addLast: ((CMakeMessage new) message: 'CHECK_INCLUDE_FILES');
addLast: ((CMakeCheckIncludeFile new) include:'unistd.h' variable:'HAVE_UNISTD_H');
addLast: ((CMakeCheckIncludeFile new) include:'dirent.h' variable:'HAVE_DIRENT_H');
addLast: ((CMakeCheckIncludeFile new) include:'pty.h' variable:'HAVE_PTY_H');
addLast: ((CMakeCheckIncludeFile new) include:'stropts.h' variable:'HAVE_STROPTS_H').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configCheckLibraryExistsTemplates [
|templates|
templates:= OrderedCollection new.
templates
addLast: ((CMakeMessage new) message: 'CHECK_LIBRARY_EXISTS');
addLast: ((CMakeCheckLibraryExists new) library: 'dl' function: 'dlopen' location:'' variable: 'HAVE_LIBDL' ).
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configExplicitImageWidth [
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# explicit image width');
addLast: ((CMakeCheckIncludeFile new) include:'unistd.h' variable:'HAVE_UNISTD_H').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configFindPackageTemplates [
|templates|
templates:= OrderedCollection new.
templates
addLast: ((CMakeMessage new) message: 'FIND_PACKAGE');
addLast: ((CMakeFindPackage new) packagename: 'X11');
addLast: (CMakeFindPackageOpenGL new).
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configIanPiumartasTemplates [
|templates|
self flag:'tty'. "fix this version stuff. get ostype from elsewhere. does the without-gl flag need to be here?"
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'DebugTemplate');
addLast: (CMakeDebug new);
addLast:((CMakeMessage new) message:'Global Configs');
addLast: ((CMakeSetConfigDefine new) variable: 'OS_TYPE' value:'\"${platformName}\"'); "defined in INCLUDE(directories.cmake) in CMakeLists.txt"
addLast: ((CMakeVersion new) version: '1.2.3.4');
addLast: ((CMakeSet new) variable:'without-gl' value: '');
addLast: ((CMakeSetConfigDefine new) variable: 'NoDbgRegParms' value:'');
addLast: ((CMakeCompilerIsGNUCC new));
addLast:((CMakeMessage new) message:'Tests');
addLast:(CMakeTestBigEndian new);
addLast:(CMakeCheckFunctionAtExitOnExit new);
addAllLast: self configCheckIncludeFileTemplates;
addAllLast: self configCheckLibraryExistsTemplates;
addAllLast: self configFindPackageTemplates;
addAllLast: self configSqMemoryAccess;
addAllLast: self configPlatformSpecific;
addAllLast: self configAioC;
addAllLast: self configSqUnixCharConv;
addAllLast: self configSqExternalPrims;
addAllLast: self configSqUnixMainC;
addAllLast: self configSqUnixMMemoryC;
addAllLast: self configOLPC.
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configOLPC [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# OLPC');
addLast:((CMakeIfNotFlagSetConfigDefine new) flag: 'without-SUGAR' variable:'SUGAR');
addLast:((CMakeIfDefinedConfigDefine new) variable:'SQ_VI_BYTES_PER_WORD').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configPackageOptions [
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# package options');
addLast: ((CMakeFindPackage new) packagename: 'X11');
addLast: ((CMakeFindPackage new) packagename: 'X11_GLX');
addLast: ((CMakeFindPackage new) packagename: 'QUARTZ');
addLast: ((CMakeFindPackage new) packagename: 'QUARTZ_CGL');
addLast: ((CMakeFindPackage new) packagename: 'RFB').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configPlatformSpecific [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# sqPlatformSpecific.h');
addLast:(CMakeCheckAlloca new).
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configSqExternalPrims [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'#sqUnixExternalPrims.c');
addLast: ((CMakeCheckIncludeFile new) include:'dlfcn.h' variable:'HAVE_DLFCN_H' );
addLast: (CMakeCheckLibDL new);
addLast:((CMakeCheckFunctionExists new) function:'_dyld_present' variable:'HAVE_DYLD');
addLast:((CMakeCheckFunctionExists new) function:'snprintf' variable:'HAVE_SNPRINTF');
addLast:((CMakeCheckFunctionExists new) function:'__snprintf' variable:'HAVE___SNPRINTF');
addLast:((CMakeSetConfigDefine new) variable: 'VM_X11DIR' value:'\"${X11_LIBRARY_DIR}\"');
addLast:((CMakeSetConfigDefine new) variable: 'VM_MODULE_PREFIX' value:'\"${CMAKE_SHARED_MODULE_PREFIX}\"');
addLast:((CMakeSet new) variable:'CMAKE_SHARED_MODULE_PREFIX' value:'so.');
addLast:((CMakeSet new) variable:'CMAKE_SHARED_MODULE_SUFFIX' value:'');
addLast:((CMakeSetConfigDefine new) variable:'MODULE_PREFIX' value:'\"${CMAKE_SHARED_MODULE_PREFIX}\"');
addLast:((CMakeSetConfigDefine new) variable:'MODULE_SUFFIX' value:'\"${CMAKE_SHARED_MODULE_SUFFIX}\"');
addLast:((CMakeSetConfigDefine new) variable:'LIBRARY_PREFIX' value:'\"${CMAKE_SHARED_LIBRARY_PREFIX}\"');
addLast:((CMakeSetConfigDefine new) variable:'LIBRARY_SUFFIX' value:'\"${CMAKE_SHARED_LIBRARY_SUFFIX}\"').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configSqMemoryAccess [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'#sqMemoryAccess.h');
addLast: ((CMakeCheckIncludeFile new) include:'interp.h' variable:'HAVE_INTERP_H' path: '-I',(self srcDir pathName));
addLast:(CMakeCheckTypeSize new);
addLast:(CMakeCheckTryRunDoubleWordAlignmentOrder new).
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configSqUnixCharConv [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'#sqUnixCharConv.c');
addLast: ((CMakeCheckIncludeFile new) include:'iconv.h' variable:'HAVE_ICONV_H' );
addLast: ((CMakeCheckIncludeFile new) include:'langinfo.h' variable:'HAVE_LANGINFO_H' );
addLast:(CMakeCheckTryCompileHaveLangInfoCodeset new);
addLast:((CMakeCheckLibraryExists new) library:'iconv' function:'libiconv_open' location:'' variable:'HAVE_LIBICONV').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configSqUnixMMemoryC [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# sqUnixMain.c');
addLast:((CMakeCheckFunctionExists new) function:'mmap' variable:'HAVE_MMAP').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configSqUnixMainC [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# sqUnixMain.c');
addLast:((CMakeSetConfigDefine new) variable:'VM_BUILD_STRING' value:'"\"Unix built on \"__DATE__ \" \"__TIME__\" Compiler: \"__VERSION__"');
addLast:((CMakeSetConfigDefine new) variable:'VM_LIBDIR' value:'"\"${prefix}/${plgdir}\""');
addLast:((CMakeSetConfigDefine new) variable:'VM_HOST' value:'\"${VM_HOST}\"');
addLast:((CMakeSetConfigDefine new) variable:'VM_HOST_CPU' value:'\"${VM_HOST_CPU}\"');
addLast:((CMakeSetConfigDefine new) variable:'VM_HOST_VENDOR' value:' \"${VM_HOST_VENDOR}\"');
addLast:((CMakeSetConfigDefine new) variable:'VM_HOST_OS' value:' \"${VM_HOST_OS}\"');
addLast:((CMakeSetConfigDefine new) variable:'VM_VERSION' value: '\"${VM_VERSION}\"');
addLast:((CMakeSetConfigDefine new) variable:'VM_VERSION_INFO' value: '\"${VM_VERSION}${versionsuffix}\"');
addLast:((CMakeSetConfigDefine new) variable:'PLATFORM_SOURCE_VERSION' value: '\"${PLATFORM_SOURCE_VERSION}\"');
addLast:((CMakeConfigDefine new) variable:'SQ_VERSION');
addLast:((CMakeCheckFunctionExists new) function:'tzset' variable:'HAVE_TZSET');
addLast:((CMakeCheckVariableExists new) var:'timezone' variable:'HAVE_TIMEZONE');
addLast:((CMakeCheckStructHasMember new)struct: '"struct tm"' member: 'tm_gmtoff' header: 'time.h' variable: 'HAVE_TM_GMTOFF');
addLast:((CMakeConfigDefine new) variable:'IMAGE_DUMP').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configTemplates [
|templates|
self flag:'tty'. "fix this version stuff. get ostype from elsewhere. does the without-gl flag need to be here?"
templates:= OrderedCollection new.
templates
addAllLast: self configUnDefineAll;
addAllLast: self configExplicitImageWidth;
addAllLast: self configPackageOptions;
addLast:((CMakeMessage new) message:'/* libraries */');
addLast:((CMakeMessage new) message:'/* header files */');
addLast:((CMakeMessage new) message:'/* system calls/library functions */');
addLast:((CMakeMessage new) message:'/* widths of primitive types */');
addLast:((CMakeMessage new) message:'/* typedefs */');
addLast:((CMakeMessage new) message:'/* architecture */');
addLast:((CMakeMessage new) message:'/* damage containment */');
addLast:((CMakeMessage new) message:'/* avoid dependencies on glibc2.3 */').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configUnDefineAll [
|templates|
self flag: 'tty'. "I don't think this is needed, but I am playing it safe. It may become useful in automated builds. or unicorns may fly"
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'# undef explicit image width');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_INTERP_H');
addLast:((CMakeMessage new) message:'# undef package options');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_X11');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_X11_GLX');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_QUARTZ');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_QUARTZ_CGL');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_RFB');
addLast:((CMakeMessage new) message:'# undef libraries');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_LIBX11');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_LIBXEXT');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_LIBDL');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_DYLD');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_LIBFFI');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_ICONV');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_AUDIO_NONE');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_AUDIO_SUN');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_AUDIO_NAS');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_AUDIO_OSS');
addLast: ((CMakeConfigUnDefine new) variable: 'USE_AUDIO_MACOSX');
addLast: ((CMakeConfigUnDefine new) variable: 'OSS_DEVICE');
addLast:((CMakeMessage new) message:'# undef header files');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_UNISTD_H');
addLast: ((CMakeConfigUnDefine new) variable: 'NEED_GETHOSTNAME_P');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_DIRENT_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SYS_NDIR_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SYS_DIR_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_NDIR_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_DLFCN_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_ICONV_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SYS_TIME_H');
addLast: ((CMakeConfigUnDefine new) variable: 'TIME_WITH_SYS_TIME');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SYS_FILIO_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SYS_AUDIOIO_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SUN_AUDIOIO_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_PTY_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_UTIL_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_LIBUTIL_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_STROPTS_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_GL_GL_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_OPENGL_GL_H');
addLast: ((CMakeConfigUnDefine new) variable: 'NEED_SUNOS_H');
addLast:((CMakeMessage new) message:'# undef system calls/library functions ');
addLast: ((CMakeConfigUnDefine new) variable: 'AT_EXIT');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_TZSET');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_OPENPTY');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_UNIX98_PTYS');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_SNPRINTF');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE___SNPRINTF');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_MMAP');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_DYLD');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_LANGINFO_CODESET');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_ALLOCA');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_ALLOCA_H');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_UNSETENV');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_NANOSLEEP');
addLast:((CMakeMessage new) message:'# undef widths of primitive types');
addLast: ((CMakeConfigUnDefine new) variable: 'SIZEOF_INT');
addLast: ((CMakeConfigUnDefine new) variable: 'SIZEOF_LONG');
addLast: ((CMakeConfigUnDefine new) variable: 'SIZEOF_LONG_LONG');
addLast: ((CMakeConfigUnDefine new) variable: 'SIZEOF_VOID_P');
addLast:((CMakeMessage new) message:'# undef structures');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_TM_GMTOFF');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_TIMEZONE');
addLast:((CMakeMessage new) message:'# undef typedefs');
addLast: ((CMakeConfigUnDefine new) variable: 'size_t');
addLast: ((CMakeConfigUnDefine new) variable: 'socklen_t');
addLast: ((CMakeConfigUnDefine new) variable: 'squeakInt64');
addLast:((CMakeMessage new) message:'# undef architecture');
addLast: ((CMakeConfigUnDefine new) variable: 'OS_TYPE');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_HOST');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_HOST_CPU');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_HOST_VENDOR');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_HOST_OS');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_BUILD_STRING');
addLast: ((CMakeConfigUnDefine new) variable: 'WORDS_BIGENDIAN');
addLast: ((CMakeConfigUnDefine new) variable: 'DOUBLE_WORD_ALIGNMENT');
addLast:((CMakeMessage new) message:'# undef damage containment');
addLast: ((CMakeConfigUnDefine new) variable: 'DARWIN');
addLast:((CMakeMessage new) message:'# undef other configured variables');
addLast: ((CMakeConfigUnDefine new) variable: 'SQ_VERSION');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_VERSION');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_MODULE_PREFIX');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_DLSYM_PREFIX');
addLast: ((CMakeConfigUnDefine new) variable: 'VM_X11DIR');
addLast:((CMakeMessage new) message:'# undef avoid dependencies on glibc2.3');
addLast: ((CMakeConfigUnDefine new) variable: 'HAVE_FEATURES_H').
^ templates
]
{ #category : #'cmake configuration' }
SqueakUnixConfig >> configsqUnixCharConv [
"holdover from Ian's work"
|templates|
templates:= OrderedCollection new.
templates
addLast:((CMakeMessage new) message:'#sqUnixCharConv.c');
addLast: ((CMakeCheckIncludeFile new) include:'iconv.h' variable:'HAVE_ICONV_H' );
addLast: ((CMakeCheckIncludeFile new) include:'langinfo.h' variable:'HAVE_LANGINFO_H' );
addLast:(CMakeCheckTryCompileHaveLangInfoCodesetTemplate new);
addLast:((CMakeCheckLibraryExists new) library:'iconv' function:'libiconv_open' location:'' variable:'HAVE_LIBICONV').
^ templates
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateAsynchFilePlugin: aMaker [
aMaker templates addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixAsynchFile.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateB3DAcceleratorPlugin: aMaker [
super configureByTemplateB3DAcceleratorPlugin: aMaker.
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixOpenGL.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateDropPlugin: aMaker [
aMaker templates
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/FilePlugin'));
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixDragDrop.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateFT2Plugin: aMaker [
self flag: 'tty'. "See portability comment below"
aMaker templates
addLast:((CMakeListAppend new) list:'LINKLIBS' elements: (OrderedCollection with: 'freetype'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '/usr/include/freetype2')). "<---THIS IS NOT PORTABLE.."
"On a refactoring pass, the 'cmake .' commmand should be able to dig this library up generically and the argument to with: can be a variable"
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateFileCopyPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixFileCopyPlugin.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateFilePlugin: aMaker [
super configureByTemplateFilePlugin: aMaker.
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixFile.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateInternetConfigPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixInternetConfiguration.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateJoystickTabletPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixJoystickTablet.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateLocalePlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixLocale.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateMIDIPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixMIDI.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateSecurityPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixSecurity.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateSerialPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixSerial.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateSocketPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixSocket.c'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateSoundPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixSound.c'));
addLast:((CMakeListAppend new) list:'LINKLIBS' elements: (OrderedCollection with: 'asound'))
]
{ #category : #'plugin extra rules' }
SqueakUnixConfig >> configureByTemplateSqueakSSLPlugin: aMaker [
aMaker templates
addLast:((CMakeListAppend new) list:'sources' elements: (OrderedCollection with: '${pluginPlatform}/sqUnixOpenSSL.c'));