Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 469 lines (418 sloc) 18.436 kb
908686e New CMake build system
Giacomo Spigler authored
1 #**************************************************************************
2 # Lightspark, a free flash player implementation
3 #
93e14d4 @alexp-sssup Bump copyright notices
alexp-sssup authored
4 # Copyright (C) 2010-2011 Alessandro Pignotti <a.pignotti@sssup.it>
908686e New CMake build system
Giacomo Spigler authored
5 # Copyright (C) 2010 Giacomo Spigler <g.spigler@sssup.it>
6 #
7 # This program is free software: you can redistribute it and/or modify
1b969ce @alexp-sssup Final fixes to license disclaimers
alexp-sssup authored
8 # it under the terms of the GNU Lesser General Public License as published by
908686e New CMake build system
Giacomo Spigler authored
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1b969ce @alexp-sssup Final fixes to license disclaimers
alexp-sssup authored
15 # GNU Lesser General Public License for more details.
908686e New CMake build system
Giacomo Spigler authored
16 #
1b969ce @alexp-sssup Final fixes to license disclaimers
alexp-sssup authored
17 # You should have received a copy of the GNU Lesser General Public License
908686e New CMake build system
Giacomo Spigler authored
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #**************************************************************************
20
21
22 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
23
a0263f6 @QuLogic Rearrange CMakeLists.txt.
QuLogic authored
24 # Name & Version
908686e New CMake build system
Giacomo Spigler authored
25 PROJECT(LIGHTSPARK)
6c5351b @QuLogic Build a shared lightspark library.
QuLogic authored
26 SET(MAJOR_VERSION "0")
45b9eea @alexp-sssup Version bump for 0.5.0
alexp-sssup authored
27 SET(MINOR_VERSION "5")
1a1b7c4 @alexp-sssup Bump for release
alexp-sssup authored
28 SET(PATCH_VERSION "6")
9554579 @alexp-sssup Bump version to 0.5.5
alexp-sssup authored
29 SET(SUBPATCH_VERSION "0")
200c692 @alexp-sssup Add --version|-v command line switch
alexp-sssup authored
30
2543fc1 @timonvo Add -git suffix to VERSION when .git directory is detected. Change co…
timonvo authored
31 IF(EXISTS "${CMAKE_SOURCE_DIR}/.git/")
32 SET(GIT_VERSION "-git")
186f057 @mgehre cmake: append current git revision to version
mgehre authored
33
34 #Find out if we are exactly at a tag. Then the version
f74f22b @mgehre cmake: when determining if we are at a release version, only consider…
mgehre authored
35 #is enough. Only consider the official release tags like
36 #'lightspark-0.5.3'
37 EXECUTE_PROCESS(COMMAND git describe --match "lightspark-*" --tags
186f057 @mgehre cmake: append current git revision to version
mgehre authored
38 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
39 OUTPUT_VARIABLE GIT_DESC
40 ERROR_QUIET
41 OUTPUT_STRIP_TRAILING_WHITESPACE)
42 #Check if that command failed (maybe git is not installed at all)
43 IF(GIT_DESC)
f74f22b @mgehre cmake: when determining if we are at a release version, only consider…
mgehre authored
44 EXECUTE_PROCESS(COMMAND git describe --match "lightspark-*" --tags --abbrev=0
186f057 @mgehre cmake: append current git revision to version
mgehre authored
45 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
46 OUTPUT_VARIABLE GIT_DESC_ABBREV
47 ERROR_QUIET
48 OUTPUT_STRIP_TRAILING_WHITESPACE)
49
50 IF(${GIT_DESC} STREQUAL ${GIT_DESC_ABBREV})
51 #We are exactly at a tag
52 SET(GIT_VERSION "")
53 ELSE()
5d5e43c @mgehre cmake: include 'number of commits since last tag' in version string
mgehre authored
54 #Append to GIT_VERSION
55 #GIT_DESC_ABBREV is of the form lightspark-0.5.3 (the name of the previous tag)
56 #GIT_DESC is of the form lightspark-0.5.3-69-gf49ec56 (tag-numberOfCommits-currentHash)
57 #We want GIT_REVISION to be 69-gf49ec56
58 #which denotes the number of commits since the last tag (=release)
59 #and the current commit's hash
60 STRING(REPLACE "${GIT_DESC_ABBREV}-" "" GIT_REVISION "${GIT_DESC}")
61 SET(GIT_VERSION "-${GIT_REVISION}")
186f057 @mgehre cmake: append current git revision to version
mgehre authored
62 ENDIF()
63 ENDIF()
2543fc1 @timonvo Add -git suffix to VERSION when .git directory is detected. Change co…
timonvo authored
64 ELSE(EXISTS "${CMAKE_SOURCE_DIR}/.git/")
65 SET(GIT_VERSION "")
66 ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/.git/")
67
7194f9a @alexp-sssup Strip trailing 0 from reported version
alexp-sssup authored
68 IF(SUBPATCH_VERSION EQUAL "0")
186f057 @mgehre cmake: append current git revision to version
mgehre authored
69 SET(FULLVERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${GIT_VERSION}")
7194f9a @alexp-sssup Strip trailing 0 from reported version
alexp-sssup authored
70 ELSE(SUBPATCH_VERSION EQUAL "0")
186f057 @mgehre cmake: append current git revision to version
mgehre authored
71 SET(FULLVERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.${SUBPATCH_VERSION}${GIT_VERSION}")
7194f9a @alexp-sssup Strip trailing 0 from reported version
alexp-sssup authored
72 ENDIF(SUBPATCH_VERSION EQUAL "0")
73
186f057 @mgehre cmake: append current git revision to version
mgehre authored
74 SET(SHORTVERSION "${MINOR_VERSION}${PATCH_VERSION}${SUBPATCH_VERSION}")
75
76 CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/version.h" @ONLY)
77 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
6c5351b @QuLogic Build a shared lightspark library.
QuLogic authored
78
a1f988f @QuLogic Require GCC 4.4+.
QuLogic authored
79 # GCC 4.4+ is required, GCC_VERSION macro taken from GCC manual
80 INCLUDE(CheckCSourceCompiles)
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
81 IF(CMAKE_COMPILER_IS_GNUCC)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
82 CHECK_C_SOURCE_COMPILES("
83 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
84 #if GCC_VERSION < 40400
85 #error
86 #endif
87 int main() { return 0; }" GCC_IS_4_4)
88 IF(NOT GCC_IS_4_4)
89 MESSAGE(FATAL_ERROR "GCC 4.4+ is required.")
90 ENDIF(NOT GCC_IS_4_4)
727b49e Some other fixes since last merge from master
Alexandre Demers authored
91 ENDIF(CMAKE_COMPILER_IS_GNUCC)
a1f988f @QuLogic Require GCC 4.4+.
QuLogic authored
92
5e3a183 @alexp-sssup Make gnash path configurable
alexp-sssup authored
93 # Find put the path of the gnash executable, if available
94 FIND_PROGRAM(GNASH_EXE_PATH NAMES gnash)
95
96 IF(GNASH_EXE_PATH)
97 MESSAGE(STATUS "Found gnash path: ${GNASH_EXE_PATH}")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
98 ELSE(GNASH_EXE_PATH)
5e3a183 @alexp-sssup Make gnash path configurable
alexp-sssup authored
99 # Set a default path
100 MESSAGE(STATUS "Gnash not found")
101 SET(GNASH_EXE_PATH "/usr/bin/gnash")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
102 ENDIF(GNASH_EXE_PATH)
5e3a183 @alexp-sssup Make gnash path configurable
alexp-sssup authored
103
4a27ce5 Use relative pathes for installation
Alexandre Demers authored
104 # Find out CPU architecture ...
105 # we could also use IF(CMAKE_SIZEOF_VOID_P EQUAL 4) to determine if it's a 32 or a 64bit arch
3aab45f Better usage of LIB_SUFFIX
Alexandre Demers authored
106 #
107 # Setting the value of LIB_SUFFIX if not specified (We could build 32bit version on 64bit)
108 # However, some distro don't implement FHS the same way
109 # Suse, Redhat put 64bit libs in /lib64; Debian use /lib for 64bit, but specifies /lib32 for 32bit libs
110 # See FHS 2.3 for Lib directories under each architecture
9fcf4ac Added initial PPC support
DaNiMoTh authored
111
112 # Some directory shortcuts
113 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/conf)
421128b @mgehre cmake: enable compression by upx
mgehre authored
114 INCLUDE(Pack)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
115 # If we're gcc, then use nasm to get fastpath. If MSVC, just use inline asm to get around
116 # CMake issues
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
117 IF(CMAKE_COMPILER_IS_GNUCC)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
118 INCLUDE(CMakeASM-NASMCompiler)
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
119 ENDIF(CMAKE_COMPILER_IS_GNUCC)
4c764af @alexp-sssup Fix 64bit building
alexp-sssup authored
120 IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i[3-6]86$|^x86$")
f6bda0a Fixed installation pathes between 32 and 64bit architectures by deter…
Alexandre Demers authored
121 SET(i386 1)
559ed0f @alexp-sssup Fix some spaces-tabs
alexp-sssup authored
122 SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None 32")
9fcf4ac Added initial PPC support
DaNiMoTh authored
123 # nasm for assembly optimizations
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
124 IF(CMAKE_COMPILER_IS_GNUCC)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
125 ENABLE_LANGUAGE(ASM-NASM)
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
126 ENDIF(CMAKE_COMPILER_IS_GNUCC)
2de307a @OdyX Add support for Hurd and common fallback for various architectures to…
OdyX authored
127 ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "unknown" AND ${CMAKE_SYSTEM} MATCHES "GNU-0.3")
128 # GNU Hurd is i386
129 SET(i386 1)
130 SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None 32")
131 # nasm for assembly optimizations
132 IF(CMAKE_COMPILER_IS_GNUCC)
133 ENABLE_LANGUAGE(ASM-NASM)
134 ENDIF ()
4c764af @alexp-sssup Fix 64bit building
alexp-sssup authored
135 ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64$|^amd64$")
f6bda0a Fixed installation pathes between 32 and 64bit architectures by deter…
Alexandre Demers authored
136 SET(x86_64 1)
0403e83 @alexp-sssup Install libraries in FHS compliant place by default
alexp-sssup authored
137 SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None 64")
9fcf4ac Added initial PPC support
DaNiMoTh authored
138 # nasm for assembly optimizations
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
139 IF(CMAKE_COMPILER_IS_GNUCC)
140 ENABLE_LANGUAGE(ASM-NASM)
141 ENDIF(CMAKE_COMPILER_IS_GNUCC)
9fcf4ac Added initial PPC support
DaNiMoTh authored
142 ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
143 SET(ppc 1)
144 SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None ppc")
a765034 First try to ppc fastpaths.
DaNiMoTh authored
145 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -D__STDC_CONSTANT_MACROS -fPIC")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
146 ELSE(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i[3-6]86$|^x86$")
2de307a @OdyX Add support for Hurd and common fallback for various architectures to…
OdyX authored
147 # All non-x86 non-ppc architectures.
148 SET(LIB_SUFFIX "" CACHE STRING "Choose the suffix of the lib folder (if any) : None")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
149 ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i[3-6]86$|^x86$")
f6bda0a Fixed installation pathes between 32 and 64bit architectures by deter…
Alexandre Demers authored
150
78c4a3b @mgehre cmake: detect crosscompiling
mgehre authored
151 IF(CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
152 SET(CROSSCOMPILING FALSE)
153 ELSE()
154 SET(CROSSCOMPILING TRUE)
155 ENDIF()
156
df76f19 @mgehre cmake: setup for mingw-cross-env with static dependencies
mgehre authored
157 #On mingw-cross-env, all depedencies are static libs
158 IF(CROSSCOMPILING AND MINGW)
159 SET(STATICDEPS TRUE)
160 ELSE()
161 SET(STATICDEPS FALSE)
162 ENDIF()
163
4a27ce5 Use relative pathes for installation
Alexandre Demers authored
164 # Using relative folders, cmake happens by itself CMAKE_INSTALL_PREFIX
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
165 IF(UNIX)
3faef65 @mgehre cmake: setup install paths for win32 build
mgehre authored
166 SET(ETCDIR "/etc") #Using absolute folder
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
167 SET(BINDIR "bin")
d94f545 @mgehre cmake: configure install paths for win32
mgehre authored
168 SET(DATADIR "share")
2679268 @aajanki cmake: Use absolute path for LSDATADIR
aajanki authored
169 # Absolute path, because this path is embedded in the binary
170 SET(LSDATADIR "${CMAKE_INSTALL_PREFIX}/${DATADIR}/lightspark")
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
171 SET(LIBDIR "lib${LIB_SUFFIX}")
d94f545 @mgehre cmake: configure install paths for win32
mgehre authored
172 #We need a absolute path here because we use it for rpath
173 #later on
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
174 SET(PRIVATELIBDIR "${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lightspark")
175 SET(CMAKE_INSTALL_RPATH "${PRIVATELIBDIR}")
7177eed @mgehre cmake: install audio plugins on win32
mgehre authored
176 SET(PLUGINSDIR "${PRIVATELIBDIR}/plugins")
3faef65 @mgehre cmake: setup install paths for win32 build
mgehre authored
177 ELSE()
178 SET(ETCDIR ".")
179 SET(BINDIR ".")
180 SET(DATADIR ".")
181 SET(LSDATADIR ".")
182 SET(LIBDIR ".")
183 SET(PRIVATELIBDIR ".")
7177eed @mgehre cmake: install audio plugins on win32
mgehre authored
184 SET(PLUGINSDIR ".")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
185 ENDIF(UNIX)
f6bda0a Fixed installation pathes between 32 and 64bit architectures by deter…
Alexandre Demers authored
186
3aab45f Better usage of LIB_SUFFIX
Alexandre Demers authored
187 # Setting variables
96fc8d5 @mgehre cmake: Make 'sdl' backend default on win32
mgehre authored
188 IF(WIN32)
0488f3d @mgehre cmake: win32: switch default audio from sdl to winmm
mgehre authored
189 SET(AUDIO_BACKEND "winmm" CACHE STRING "Which audio backends should be built?")
96fc8d5 @mgehre cmake: Make 'sdl' backend default on win32
mgehre authored
190 ELSE()
191 SET(AUDIO_BACKEND "pulseaudio" CACHE STRING "Which audio backends should be built?")
192 ENDIF()
193
c36b827 @alexp-sssup Fix string escape
alexp-sssup authored
194 SET(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Install prefix, default is /usr/local (UNIX) and C:\\Program Files (Windows)")
908686e New CMake build system
Giacomo Spigler authored
195 SET(COMPILE_LIGHTSPARK TRUE CACHE BOOL "Compile Lightspark?")
196 SET(COMPILE_TIGHTSPARK TRUE CACHE BOOL "Compile Tightspark?")
ebda96e @janimo build browser plugin by default
janimo authored
197 SET(COMPILE_PLUGIN TRUE CACHE BOOL "Compile the browser plugin?")
b85bfd5 @ZeroStride CURL support optional
ZeroStride authored
198 SET(ENABLE_CURL TRUE CACHE BOOL "Enable CURL? (Required for Downloader functionality)")
cd70b20 @janimo Add ENABLE_GLES2 config option to the build
janimo authored
199 SET(ENABLE_GLES2 FALSE CACHE BOOL "Build with OpenGLES 2.0 support instead of OpenGL")
64c5bb5 @ZeroStride CMAKE now has an ENABLE_LIBAVCODEC flag, which is true by default.
ZeroStride authored
200 SET(ENABLE_LIBAVCODEC TRUE CACHE BOOL "Enable libavcodec and dependent functionality?")
9f5530d @alexp-sssup Document ENABLE_RTMP switch
alexp-sssup authored
201 SET(ENABLE_RTMP FALSE CACHE BOOL "Enable librtmp and dependent functionality?")
9df12c4 @alexp-sssup Add profiling configuration switch
alexp-sssup authored
202 SET(ENABLE_PROFILING FALSE CACHE BOOL "Enable profiling support? (Causes performance issues)")
4a27ce5 Use relative pathes for installation
Alexandre Demers authored
203 SET(PLUGIN_DIRECTORY "${LIBDIR}/mozilla/plugins" CACHE STRING "Directory to install Firefox plugin to")
3faef65 @mgehre cmake: setup install paths for win32 build
mgehre authored
204
d94f545 @mgehre cmake: configure install paths for win32
mgehre authored
205 IF(ENABLE_DEBIAN_ALTERNATIVES OR WIN32)
3faef65 @mgehre cmake: setup install paths for win32 build
mgehre authored
206 SET(PLUGIN_DIRECTORY ${PRIVATELIBDIR})
207 ENDIF()
208
3aab45f Better usage of LIB_SUFFIX
Alexandre Demers authored
209 IF(NOT CMAKE_BUILD_TYPE)
559ed0f @alexp-sssup Fix some spaces-tabs
alexp-sssup authored
210 SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
63e0fd4 @thomasdziedzic get rid of debian build type because O3 was removed
thomasdziedzic authored
211 "Choose the type of build, options are: Debug Release RelWithDebInfo Profile" FORCE)
3aab45f Better usage of LIB_SUFFIX
Alexandre Demers authored
212 ENDIF(NOT CMAKE_BUILD_TYPE)
908686e New CMake build system
Giacomo Spigler authored
213
6fd0251 @alexp-sssup Fix build system
alexp-sssup authored
214 # The library is searched in its private library directory
215 SET(CMAKE_SKIP_BUILD_RPATH FALSE)
580d54d The audioManager is now able to find and load the audio plugins.
Alexandre Demers authored
216 SET(CMAKE_INSTALL_RPATH "${PRIVATELIBDIR}")
6fd0251 @alexp-sssup Fix build system
alexp-sssup authored
217
a0263f6 @QuLogic Rearrange CMakeLists.txt.
QuLogic authored
218 # Libraries we need
d13b59a @mgehre cmake: always include pkg-config (it is available on win32, too)
mgehre authored
219 INCLUDE(FindPkgConfig REQUIRED)
b42892d @thomasdziedzic Add gettext support.
thomasdziedzic authored
220 INCLUDE(FindGettext REQUIRED)
ee2199e @alexp-sssup Fixed detection of ZLib and other libraries
alexp-sssup authored
221 INCLUDE(FindLLVM REQUIRED)
ae0696f @mgehre CMakeList: fix check for LLVM >= 2.8
mgehre authored
222 IF(${LLVM_STRING_VERSION} VERSION_LESS 2.8)
6431d35 @mgehre Require llvm-2.8 or higher (but no llvm-2.9)
mgehre authored
223 MESSAGE(FATAL_ERROR "LLVM >=2.8 is required!")
ae0696f @mgehre CMakeList: fix check for LLVM >= 2.8
mgehre authored
224 ENDIF(${LLVM_STRING_VERSION} VERSION_LESS 2.8)
6431d35 @mgehre Require llvm-2.8 or higher (but no llvm-2.9)
mgehre authored
225 IF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.9)
226 MESSAGE(FATAL_ERROR "LLVM !=2.9 is required!")
227 ENDIF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.9)
228 IF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.8)
92894b7 @alexp-sssup Fix support for newer LLVM
alexp-sssup authored
229 ADD_DEFINITIONS(-DLLVM_28)
6431d35 @mgehre Require llvm-2.8 or higher (but no llvm-2.9)
mgehre authored
230 ENDIF(${LLVM_STRING_VERSION} VERSION_EQUAL 2.8)
236bb6f @dbluelle fix building lightspark with llvm 3.0
dbluelle authored
231 IF(${LLVM_STRING_VERSION} VERSION_GREATER 2.9)
232 ADD_DEFINITIONS(-DLLVM_3)
233 ENDIF(${LLVM_STRING_VERSION} VERSION_GREATER 2.9)
ee2199e @alexp-sssup Fixed detection of ZLib and other libraries
alexp-sssup authored
234 INCLUDE(FindZLIB REQUIRED)
0401571 @bzztbomb Fix Linux issues introduced by previous commit.
bzztbomb authored
235 INCLUDE(FindFreetype REQUIRED)
cd70b20 @janimo Add ENABLE_GLES2 config option to the build
janimo authored
236 IF(NOT(ENABLE_GLES2))
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
237 INCLUDE(FindOpenGL REQUIRED)
238 INCLUDE(FindGLEW REQUIRED)
cd70b20 @janimo Add ENABLE_GLES2 config option to the build
janimo authored
239 ENDIF(NOT(ENABLE_GLES2))
240 INCLUDE(FindPCRE REQUIRED)
f92bf55 @mgehre Implemented backends/jpeg
mgehre authored
241 INCLUDE(FindJPEG REQUIRED)
c0b74c9 @dbluelle support for PNG images added
dbluelle authored
242 INCLUDE(FindPNG REQUIRED)
e675d09 @aajanki Rewrote libxml++ version CMake test
aajanki authored
243 pkg_check_modules(XMLPP REQUIRED libxml++-2.6>=2.33.1)
18956fb @alexp-sssup Be more tolerant to malformed XML
alexp-sssup authored
244
e675d09 @aajanki Rewrote libxml++ version CMake test
aajanki authored
245 IF(XMLPP_FOUND AND NOT(XMLPP_VERSION VERSION_LESS 2.35.1))
246 ADD_DEFINITIONS(-DXMLPP_2_35_1)
247 ENDIF(XMLPP_FOUND AND NOT(XMLPP_VERSION VERSION_LESS 2.35.1))
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
248
7f1a01b @alexp-sssup Purge reference to boost::regex
alexp-sssup authored
249 find_package(Boost COMPONENTS filesystem system REQUIRED)
7aef583 Some default initialization for interfaces
Alexandre Demers authored
250 if(Boost_FOUND)
251 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
b609cde @thomasdziedzic Switch all pcrecpp to pcre
thomasdziedzic authored
252 ENDIF(Boost_FOUND)
1f0646b @mgehre cmake: cairo is also required on win32
mgehre authored
253
d55ca47 @alexp-sssup [Cmake] Fix name of cairo related build information
alexp-sssup authored
254 pkg_check_modules(CAIRO REQUIRED cairo pangocairo)
1f0646b @mgehre cmake: cairo is also required on win32
mgehre authored
255
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
256 IF(UNIX)
1f0646b @mgehre cmake: cairo is also required on win32
mgehre authored
257 pkg_check_modules(X11 REQUIRED x11)
258 INCLUDE_DIRECTORIES(${X11_INCLUDE_DIRS})
727b49e Some other fixes since last merge from master
Alexandre Demers authored
259 ENDIF(UNIX)
908686e New CMake build system
Giacomo Spigler authored
260
cd70b20 @janimo Add ENABLE_GLES2 config option to the build
janimo authored
261 IF(ENABLE_GLES2)
262 pkg_check_modules(GLES2 REQUIRED egl glesv2)
263 ADD_DEFINITIONS(-DENABLE_GLES2)
264 ENDIF(ENABLE_GLES2)
265
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
266 IF(WIN32)
971abb6 @mgehre cmake: adjust for mingw
mgehre authored
267 SET(EXTRA_LIBS_LIBRARIES ${EXTRA_LIBS_LIBRARIES} ws2_32.lib imagehlp.lib)
727b49e Some other fixes since last merge from master
Alexandre Demers authored
268 ENDIF(WIN32)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
269
518816d @mgehre config: if only one audio plugin was compiled, use that as default
mgehre authored
270 IF(AUDIO_BACKEND)
271 ADD_DEFINITIONS(-DAUDIO_BACKEND="${AUDIO_BACKEND}")
272 ENDIF(AUDIO_BACKEND)
3ee14f5 @alexp-sssup Avoid checking for libpulse if sound is disabled
alexp-sssup authored
273
64c5bb5 @ZeroStride CMAKE now has an ENABLE_LIBAVCODEC flag, which is true by default.
ZeroStride authored
274 IF(ENABLE_LIBAVCODEC)
db06212 @alexp-sssup Add libavformat based stream decoder
alexp-sssup authored
275 pkg_check_modules(FFMPEG libavcodec libavutil libavformat)
dde985e @QuLogic Fallback to old FindFFMpeg script when pkg-config fails.
QuLogic authored
276 IF(NOT(FFMPEG_FOUND))
277 INCLUDE(FindFFMpeg REQUIRED)
278 ENDIF(NOT(FFMPEG_FOUND))
64c5bb5 @ZeroStride CMAKE now has an ENABLE_LIBAVCODEC flag, which is true by default.
ZeroStride authored
279 # Compatibility checks for ffmpeg deprecated functions
727b49e Some other fixes since last merge from master
Alexandre Demers authored
280 INCLUDE(CheckFunctionExists REQUIRED)
281 SET(CMAKE_REQUIRED_FLAGS ${LIBAVCODEC_CFLAGS})
282 SET(CMAKE_REQUIRED_INCLUDES ${FFMPEG_INCLUDE_DIRS})
283 SET(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES})
284 CHECK_FUNCTION_EXISTS(avcodec_decode_video2 HAVE_AVCODEC_DECODE_VIDEO2)
285 CHECK_FUNCTION_EXISTS(avcodec_decode_audio3 HAVE_AVCODEC_DECODE_AUDIO3)
286 SET(CMAKE_REQUIRED_FLAGS)
287 SET(CMAKE_REQUIRED_INCLUDES)
288 SET(CMAKE_REQUIRED_LIBRARIES)
289 IF(HAVE_AVCODEC_DECODE_VIDEO2)
290 ADD_DEFINITIONS(-DHAVE_AVCODEC_DECODE_VIDEO2)
291 ENDIF(HAVE_AVCODEC_DECODE_VIDEO2)
292 IF(HAVE_AVCODEC_DECODE_AUDIO3)
293 ADD_DEFINITIONS(-DHAVE_AVCODEC_DECODE_AUDIO3)
294 ENDIF(HAVE_AVCODEC_DECODE_AUDIO3)
295 ADD_DEFINITIONS(-DENABLE_LIBAVCODEC)
64c5bb5 @ZeroStride CMAKE now has an ENABLE_LIBAVCODEC flag, which is true by default.
ZeroStride authored
296 ENDIF(ENABLE_LIBAVCODEC)
4aebf14 @QuLogic Re-apply "Removed deprecated functions (from avcodec.h) and replaced …
QuLogic authored
297
170e404 @magcius Fix build.
magcius authored
298 pkg_check_modules(GLIB REQUIRED glib-2.0)
f1c1043 @janimo Explicitly require gthread-2.0, needed for g_thread_init in recent glib
janimo authored
299 pkg_check_modules(GTHREAD REQUIRED gthread-2.0)
33080b2 @janimo Explicitly depend on and link agains libgmodule
janimo authored
300 pkg_check_modules(GMODULE REQUIRED gmodule-2.0)
d33fbeb @mgehre cmake: find glibmm explicitly (was found though xml++ previously)
mgehre authored
301 pkg_check_modules(GLIBMM REQUIRED glibmm-2.4)
302 INCLUDE_DIRECTORIES(${GLIBMM_INCLUDE_DIRS})
170e404 @magcius Fix build.
magcius authored
303 pkg_check_modules(GTK REQUIRED gtk+-2.0)
459f4a7 @aajanki gtk is needed even when COMPILE_PLUGIN is not set
aajanki authored
304
2bb59eb @aajanki Use new glibmm thread API when available
aajanki authored
305 IF(GLIBMM_FOUND AND NOT(GLIBMM_VERSION VERSION_LESS 2.31.0))
306 ADD_DEFINITIONS(-DHAVE_NEW_GLIBMM_THREAD_API)
307 ENDIF(GLIBMM_FOUND AND NOT(GLIBMM_VERSION VERSION_LESS 2.31.0))
308
908686e New CMake build system
Giacomo Spigler authored
309 INCLUDE_DIRECTORIES(${LLVM_INCLUDE_DIR})
ee2199e @alexp-sssup Fixed detection of ZLib and other libraries
alexp-sssup authored
310 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
311 INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
cd70b20 @janimo Add ENABLE_GLES2 config option to the build
janimo authored
312 IF(ENABLE_GLES2)
313 INCLUDE_DIRECTORIES(${GLES2_INCLUDE_DIRS})
314 ELSE()
315 INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
316 INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIR})
317 ENDIF(ENABLE_GLES2)
b609cde @thomasdziedzic Switch all pcrecpp to pcre
thomasdziedzic authored
318 INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIR})
f92bf55 @mgehre Implemented backends/jpeg
mgehre authored
319 INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
c0b74c9 @dbluelle support for PNG images added
dbluelle authored
320 INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
ed5ca69 @timonvo Initial policy files support (master only). Needs a lot of testing, c…
timonvo authored
321 INCLUDE_DIRECTORIES(${XMLPP_INCLUDE_DIRS})
1f0646b @mgehre cmake: cairo is also required on win32
mgehre authored
322 INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIRS})
a75bcca @magcius toplevel: Use glib's ASCII string functions so we aren't dependent on…
magcius authored
323 INCLUDE_DIRECTORIES(${GLIB_INCLUDE_DIRS})
459f4a7 @aajanki gtk is needed even when COMPILE_PLUGIN is not set
aajanki authored
324 INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS})
3b28ca6 Linking againt boost for file and directory iteration (still a bit of…
Alexandre Demers authored
325
64c5bb5 @ZeroStride CMAKE now has an ENABLE_LIBAVCODEC flag, which is true by default.
ZeroStride authored
326 IF(ENABLE_LIBAVCODEC)
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
327 INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIRS})
328 SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${FFMPEG_LIBRARIES})
64c5bb5 @ZeroStride CMAKE now has an ENABLE_LIBAVCODEC flag, which is true by default.
ZeroStride authored
329 ENDIF(ENABLE_LIBAVCODEC)
908686e New CMake build system
Giacomo Spigler authored
330
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
331 IF(CMAKE_COMPILER_IS_GNUCC)
971abb6 @mgehre cmake: adjust for mingw
mgehre authored
332 IF(MINGW)
7c58e7d @mgehre cmake: strip in Release build
mgehre authored
333 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed,--no-undefined -mthreads ${CMAKE_EXE_LINKER_FLAGS}")
334 SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed,--no-undefined,--enable-stdcall-fixup -mthreads ${CMAKE_SHARED_LINKER_FLAGS}")
971abb6 @mgehre cmake: adjust for mingw
mgehre authored
335 ELSE()
336 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
337 SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed,-z,noexecstack,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
338 ENDIF()
7c58e7d @mgehre cmake: strip in Release build
mgehre authored
339 SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
340 SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-s")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
341 ENDIF(CMAKE_COMPILER_IS_GNUCC)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
342
343 LINK_DIRECTORIES(${LLVM_LIB_DIR})
ec3ea21 Fixed dependencies by explicitly adding them to the compiler options …
Alexandre Demers authored
344
b85bfd5 @ZeroStride CURL support optional
ZeroStride authored
345 IF(ENABLE_CURL)
df76f19 @mgehre cmake: setup for mingw-cross-env with static dependencies
mgehre authored
346 pkg_check_modules(CURL REQUIRED libcurl)
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
347 INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
df76f19 @mgehre cmake: setup for mingw-cross-env with static dependencies
mgehre authored
348 IF(STATICDEPS)
349 SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${CURL_STATIC_LIBRARIES})
350 ELSE()
351 SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${CURL_LIBRARIES})
352 ENDIF()
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
353 ADD_DEFINITIONS(-DENABLE_CURL)
b85bfd5 @ZeroStride CURL support optional
ZeroStride authored
354 ENDIF(ENABLE_CURL)
355
dc9a5fd @alexp-sssup Add ENABLE_RTMP compile time switch
alexp-sssup authored
356 IF(ENABLE_RTMP)
357 pkg_check_modules(RTMP REQUIRED librtmp)
358 SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${RTMP_LIBRARIES})
359 ADD_DEFINITIONS(-DENABLE_RTMP)
360 ENDIF(ENABLE_RTMP)
3363ea8 @alexp-sssup Make use of RTMP support
alexp-sssup authored
361
9df12c4 @alexp-sssup Add profiling configuration switch
alexp-sssup authored
362 IF(ENABLE_PROFILING)
363 ADD_DEFINITIONS(-DPROFILING_SUPPORT)
364 ENDIF(ENABLE_PROFILING)
365
3aab45f Better usage of LIB_SUFFIX
Alexandre Demers authored
366 # Compiler defaults flags for different profiles
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
367 IF(CMAKE_COMPILER_IS_GNUCC)
971abb6 @mgehre cmake: adjust for mingw
mgehre authored
368 IF(MINGW)
369 SET(CMAKE_CXX_FLAGS
370 "${CMAKE_CXX_FLAGS} -mms-bitfields -mthreads -fexceptions -Wall -Wnon-virtual-dtor -Woverloaded-virtual -pipe -std=c++0x -Wdisabled-optimization -Wextra -Wno-unused-parameter -Wno-invalid-offsetof")
371 ELSE()
372 SET(CMAKE_CXX_FLAGS
d1205e7 @mgehre Silence offsetof warnings
mgehre authored
373 "${CMAKE_CXX_FLAGS} -Wall -Wnon-virtual-dtor -Woverloaded-virtual -pipe -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wdisabled-optimization -Wextra -Wno-unused-parameter -Wno-invalid-offsetof")
971abb6 @mgehre cmake: adjust for mingw
mgehre authored
374 ENDIF()
9df12c4 @alexp-sssup Add profiling configuration switch
alexp-sssup authored
375 SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -DEXPENSIVE_DEBUG")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
376 SET(CMAKE_CXX_FLAGS_PROFILE "-g -pg -O2")
fbde36f Merge branch 'master' of git://github.com/lightspark/lightspark.git
Alexandre Demers authored
377 SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
378 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG")
379 SET(CMAKE_CXX_FLAGS_LEANDEBUG "-g -O2")
3faef65 @mgehre cmake: setup install paths for win32 build
mgehre authored
380 ADD_DEFINITIONS(-DLS_DATADIR="${LSDATADIR}" -DGNASH_PATH="${GNASH_EXE_PATH}" -DPRIVATELIBDIR="${PRIVATELIBDIR}")
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
381 ENDIF(CMAKE_COMPILER_IS_GNUCC)
382
383 IF(MSVC)
384 ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -DVPCOMPAT -DPTW32_STATIC_LIB -DPCRE_STATIC)
385 ENDIF(MSVC)
0497e0a @bzztbomb Enable CMake generation of MSVC projects on Win32.
bzztbomb authored
386
df76f19 @mgehre cmake: setup for mingw-cross-env with static dependencies
mgehre authored
387 IF(STATICDEPS)
971abb6 @mgehre cmake: adjust for mingw
mgehre authored
388 ADD_DEFINITIONS(-DLIBXML_STATIC -DGLEW_STATIC)
389 ENDIF()
390
09ea0cf @timonvo Move HAVE_ATOMIC check to _after_ the setting of default compiler che…
timonvo authored
391 # Check if the system have atomic header ( gcc >= 4.6 )
392 INCLUDE (CheckIncludeFileCXX)
393 CHECK_INCLUDE_FILE_CXX (atomic HAVE_ATOMIC)
394 IF(HAVE_ATOMIC)
395 ADD_DEFINITIONS(-DHAVE_ATOMIC)
396 ENDIF(HAVE_ATOMIC)
397
faa80aa Simplified make procedure by automatically creating the output binary…
Alexandre Demers authored
398 # Setting the output directories, so we can build all profiles without mixmatching
dc1ebd9 Merge branch 'master' of git://github.com/alexp-sssup/lightspark.git
Alexandre Demers authored
399 IF(CMAKE_COMPILER_IS_GNUCC)
400 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/${CMAKE_BUILD_TYPE}/bin")
401 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/${CMAKE_BUILD_TYPE}/lib${LIB_SUFFIX}")
402 #SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/objs/${CMAKE_SYSTEM_PROCESSOR}/${CMAKE_BUILD_TYPE}/lib${LIB_SUFFIX}" CACHE PATH "Static libraries output directory")
403 ENDIF(CMAKE_COMPILER_IS_GNUCC)
faa80aa Simplified make procedure by automatically creating the output binary…
Alexandre Demers authored
404
d554846 @thomasdziedzic apply Hicham's 'Add desktop file and sized icons' patch
thomasdziedzic authored
405 #Install icons and desktop file
406 if(UNIX)
407 FOREACH(i 16 20 22 24 32 36 48 64 72 96 128 192 256 )
408 INSTALL(FILES media/lightspark-ico-${i}x${i}.png
409 DESTINATION ${DATADIR}/icons/hicolor/${i}x${i}/apps
410 RENAME lightspark.png
411 )
412 ENDFOREACH(i)
413 INSTALL(FILES media/lightspark-ico.svg
414 DESTINATION ${DATADIR}/icons/hicolor/scalable/apps
415 RENAME lightspark.svg
416 )
417 INSTALL(FILES media/lightspark.desktop DESTINATION ${DATADIR}/applications )
418 endif(UNIX)
e083644 @timonvo Add support for configuration files. Currently audio backend, cache d…
timonvo authored
419
34ef15c @magcius Move all source code into a new src folder
magcius authored
420 # generate locales for gettext
421 GETTEXT_CREATE_TRANSLATIONS(i18n/lightspark.pot ALL i18n/pl.po i18n/fr.po
422 i18n/zh_CN.po)
423
e083644 @timonvo Add support for configuration files. Currently audio backend, cache d…
timonvo authored
424 if(UNIX)
425 INSTALL(FILES etc/xdg/lightspark.conf
200c692 @alexp-sssup Add --version|-v command line switch
alexp-sssup authored
426 DESTINATION ${ETCDIR}/xdg/)
921d8a0 @mgehre cmake: include LGPL in win32 installer
mgehre authored
427 ELSE()
428 INSTALL(FILES COPYING DESTINATION "." RENAME COPYING.txt)
429 INSTALL(FILES COPYING.LESSER DESTINATION "." RENAME COPYING.LESSER.txt)
e083644 @timonvo Add support for configuration files. Currently audio backend, cache d…
timonvo authored
430 endif(UNIX)
34ef15c @magcius Move all source code into a new src folder
magcius authored
431
432 SUBDIRS(src)
cfc0b37 @mgehre cmake: create win32 installer by 'make package'
mgehre authored
433
434 #-- CPack setup - use 'make package' to build
435 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Lightspark is an LGPLv3 licensed cross-platform Flash player and browser plugin")
436 SET(CPACK_PACKAGE_VENDOR "Lightspark Team")
437 SET(CPACK_PACKAGE_NAME "Lightspark")
438 SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
439 SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
7898f1a @mgehre cpack: add subpatch version and git version
mgehre authored
440 IF(SUBPATCH_VERSION EQUAL "0")
441 SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}${GIT_VERSION}")
442 ELSE()
443 SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}.${SUBPATCH_VERSION}${GIT_VERSION}")
444 ENDIF()
cfc0b37 @mgehre cmake: create win32 installer by 'make package'
mgehre authored
445 SET(CPACK_NSIS_MENU_LINKS "")
421128b @mgehre cmake: enable compression by upx
mgehre authored
446 #In release builds, we already strip symbols (see LDFLAGS), and compress by upx
447 #Therefore we cannot strip afterwards
448 SET(CPACK_STRIP_FILES FALSE)
cfc0b37 @mgehre cmake: create win32 installer by 'make package'
mgehre authored
449 SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/COPYING)
7128612 @mgehre cmake: change url to www.lightspark.org
mgehre authored
450 SET(CPACK_NSIS_HELP_LINK "http:////www.lightspark.org")
451 SET(CPACK_NSIS_URL_INFO_ABOUT "http:////www.lightspark.org")
cfc0b37 @mgehre cmake: create win32 installer by 'make package'
mgehre authored
452 SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/media/lightspark-logo.svg)
453 IF(WIN32)
e87f758 @mgehre cmake/win32: do not append version to Lightspark installation directory
mgehre authored
454 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Lightspark")
cfc0b37 @mgehre cmake: create win32 installer by 'make package'
mgehre authored
455 SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
456 WriteRegStr HKCU 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1' 'Description' 'Lightspark'
457 WriteRegStr HKCU 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1' 'ProductName' 'Lightspark'
458 WriteRegStr HKCU 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1' 'Vendor' 'Lightspark Team'
459 WriteRegStr HKCU 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1' 'Version' '1'
460 WriteRegStr HKCU 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1' 'Path' '$INSTDIR\\\\nplightsparkplugin.dll'
461 WriteRegStr HKCU 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1\\\\MimeTypes\\\\application/x-shockwave-flash' '' ''
462 ")
463 SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
464 DeleteRegKey HKLM 'Software\\\\MozillaPlugins\\\\@lightspark.github.com/Lightspark;version=1'
465 ")
466 ENDIF(WIN32)
467 #Must come after the definitions
468 INCLUDE(CPack)
Something went wrong with that request. Please try again.