-
Notifications
You must be signed in to change notification settings - Fork 65
/
CMWin32LibPng.class.st
67 lines (53 loc) · 1.58 KB
/
CMWin32LibPng.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
Class {
#name : #CMWin32LibPng,
#superclass : #CMLibPng,
#category : #'CMakeVMMaker-Libs'
}
{ #category : #'as yet unclassified' }
CMWin32LibPng class >> supports: aConfig [
^ aConfig platformName = 'win32'
]
{ #category : #'as yet unclassified' }
CMWin32LibPng >> build [
"LIBS=-L${installPrefix}/lib"
gen
puts:
'
add_custom_command(OUTPUT "${libpngInstalled}"
COMMAND ./configure --prefix=''${installPrefix}'' CFLAGS="-m32 -march=pentium4 -I${installPrefix}/include" CPPFLAGS="-m32 -I${installPrefix}/include" LDFLAGS="-m32 -march=pentium4 -L${installPrefix}/lib"
COMMAND make
COMMAND make install
COMMAND cp "${installPrefix}/lib/libpng.dll.a" "${installPrefix}/lib/libpng12.dll.a"
WORKING_DIRECTORY "${libSourcesDir}"
DEPENDS "${unpackTarget}" pkg-config
COMMENT "Building ${libName}"
)
'
]
{ #category : #'as yet unclassified' }
CMWin32LibPng >> defineAsTarget [
gen puts:
'add_custom_target(${libName}
DEPENDS zlib "${externalModulesDir}/${libraryFileName}"
)'
]
{ #category : #'as yet unclassified' }
CMWin32LibPng >> dependencies [
^ #( 'pkg-config' 'zlib')
]
{ #category : #'as yet unclassified' }
CMWin32LibPng >> downloadURL [
^ 'ftp://ftp.simplesystems.org/pub/libpng/png/src/history/libpng12/libpng-1.2.49.tar.gz'
]
{ #category : #'as yet unclassified' }
CMWin32LibPng >> libraryFileName [
^ 'libpng-3.dll'
]
{ #category : #'as yet unclassified' }
CMWin32LibPng >> setVariables [
super setVariables.
"add include path"
gen
set: #libraryFileName to: self libraryFileName;
set: #libpngInstalled toString: '${installPrefix}/bin/${libraryFileName}'.
]