aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/cmake')
-rw-r--r--linden/indra/cmake/00-Common.cmake40
-rw-r--r--linden/indra/cmake/APR.cmake20
-rw-r--r--linden/indra/cmake/BerkeleyDB.cmake7
-rw-r--r--linden/indra/cmake/Boost.cmake3
-rw-r--r--linden/indra/cmake/CMakeLists.txt119
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake359
-rw-r--r--linden/indra/cmake/DBusGlib.cmake1
-rw-r--r--linden/indra/cmake/ExamplePlugin.cmake16
-rw-r--r--linden/indra/cmake/FindHunSpell.cmake34
-rw-r--r--linden/indra/cmake/FindJsonCpp.cmake60
-rw-r--r--linden/indra/cmake/FindLLQtWebkit.cmake62
-rw-r--r--linden/indra/cmake/FindNDOF.cmake39
-rw-r--r--linden/indra/cmake/FindTut.cmake33
-rw-r--r--linden/indra/cmake/FindZLIB.cmake46
-rw-r--r--linden/indra/cmake/GStreamer.cmake115
-rw-r--r--linden/indra/cmake/GStreamer010Plugin.cmake76
-rw-r--r--linden/indra/cmake/Glui.cmake28
-rw-r--r--linden/indra/cmake/Glut.cmake19
-rw-r--r--linden/indra/cmake/HUNSPELL.cmake16
-rw-r--r--linden/indra/cmake/JsonCpp.cmake28
-rw-r--r--linden/indra/cmake/LLAudio.cmake2
-rw-r--r--linden/indra/cmake/LLCommon.cmake10
-rw-r--r--linden/indra/cmake/LLMedia.cmake13
-rw-r--r--linden/indra/cmake/LLPlugin.cmake8
-rw-r--r--linden/indra/cmake/MediaPluginBase.cmake8
-rw-r--r--linden/indra/cmake/Mozlib.cmake47
-rw-r--r--linden/indra/cmake/NDOF.cmake32
-rw-r--r--linden/indra/cmake/OPENAL.cmake22
-rw-r--r--linden/indra/cmake/PluginAPI.cmake16
-rw-r--r--linden/indra/cmake/PulseAudio.cmake28
-rw-r--r--linden/indra/cmake/Python.cmake2
-rw-r--r--linden/indra/cmake/QuickTimePlugin.cmake48
-rw-r--r--linden/indra/cmake/Tut.cmake15
-rw-r--r--linden/indra/cmake/UI.cmake3
-rw-r--r--linden/indra/cmake/Variables.cmake17
-rw-r--r--linden/indra/cmake/ViewerMiscLibs.cmake16
-rw-r--r--linden/indra/cmake/WebKitLibPlugin.cmake79
-rw-r--r--linden/indra/cmake/cmake_dummy.cpp30
38 files changed, 1175 insertions, 342 deletions
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake
index d1f379c..7e85ce0 100644
--- a/linden/indra/cmake/00-Common.cmake
+++ b/linden/indra/cmake/00-Common.cmake
@@ -9,9 +9,9 @@ include(Variables)
9 9
10set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1") 10set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
11set(CMAKE_CXX_FLAGS_RELEASE 11set(CMAKE_CXX_FLAGS_RELEASE
12 "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG") 12 "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
13set(CMAKE_CXX_FLAGS_RELWITHDEBINFO 13set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
14 "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") 14 "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
15 15
16 16
17# Don't bother with a MinSizeRel build. 17# Don't bother with a MinSizeRel build.
@@ -20,6 +20,14 @@ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
20 "Supported build types." FORCE) 20 "Supported build types." FORCE)
21 21
22 22
23# Determine the number of bits of this processor
24
25if(CMAKE_SIZEOF_VOID_P MATCHES 4)
26 set( HAVE_64_BIT 0 )
27else(CMAKE_SIZEOF_VOID_P MATCHES 4)
28 set( HAVE_64_BIT 1 )
29endif(CMAKE_SIZEOF_VOID_P MATCHES 4)
30
23# Platform-specific compilation flags. 31# Platform-specific compilation flags.
24 32
25if (WINDOWS) 33if (WINDOWS)
@@ -55,6 +63,7 @@ if (WINDOWS)
55 /Zc:forScope 63 /Zc:forScope
56 /nologo 64 /nologo
57 /Oy- 65 /Oy-
66 /MP
58 ) 67 )
59 68
60 if(MSVC80 OR MSVC90) 69 if(MSVC80 OR MSVC90)
@@ -169,23 +178,10 @@ if (LINUX)
169 add_definitions(-fno-stack-protector) 178 add_definitions(-fno-stack-protector)
170 endif (NOT STANDALONE) 179 endif (NOT STANDALONE)
171 if (${ARCH} STREQUAL "x86_64") 180 if (${ARCH} STREQUAL "x86_64")
172 add_definitions( -DLINUX64=1 181 # This rather needs to be done elsewhere
173 #this rather needs to be done elsewhere 182 # anyway these are the flags for the 64bit releases:
174 #anyway these are the flags for the 64bit releases: 183 add_definitions(-DLINUX64=1 -pipe)
175 -DLL_VECTORIZE=1 184 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
176 -O2
177 -fomit-frame-pointer
178 -pipe
179 -mmmx
180 -msse
181 -mfpmath=sse
182 -msse2
183 -ffast-math
184 -ftree-vectorize
185 -fweb -fexpensive-optimizations
186 -frename-registers
187 )
188
189 endif (${ARCH} STREQUAL "x86_64") 185 endif (${ARCH} STREQUAL "x86_64")
190 endif (VIEWER) 186 endif (VIEWER)
191 187
@@ -198,8 +194,8 @@ if (DARWIN)
198 add_definitions(-DLL_DARWIN=1) 194 add_definitions(-DLL_DARWIN=1)
199 set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") 195 set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
200 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") 196 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
201 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch") 197 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch -msse3 -mssse3 -w")
202 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch") 198 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch -msse3 -mssse3 -w")
203 # NOTE: it's critical that the optimization flag is put in front. 199 # NOTE: it's critical that the optimization flag is put in front.
204 # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. 200 # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
205 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") 201 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
@@ -214,7 +210,7 @@ if (LINUX OR DARWIN)
214 set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") 210 set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
215 endif (NOT GCC_DISABLE_FATAL_WARNINGS) 211 endif (NOT GCC_DISABLE_FATAL_WARNINGS)
216 212
217 set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") 213 set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual")
218 214
219 set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") 215 set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
220 set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") 216 set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake
index e9f6411..d1f0898 100644
--- a/linden/indra/cmake/APR.cmake
+++ b/linden/indra/cmake/APR.cmake
@@ -14,27 +14,27 @@ else (STANDALONE)
14 use_prebuilt_binary(apr_suite) 14 use_prebuilt_binary(apr_suite)
15 if (WINDOWS) 15 if (WINDOWS)
16 set(APR_LIBRARIES 16 set(APR_LIBRARIES
17 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib 17 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib
18 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib 18 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib
19 ) 19 )
20 set(APRICONV_LIBRARIES 20 set(APRICONV_LIBRARIES
21 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib 21 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
22 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib 22 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
23 ) 23 )
24 # Doesn't need to link with iconv.dll 24 # Doesn't need to link with iconv.dll
25 set(APRICONV_LIBRARIES "") 25 set(APRICONV_LIBRARIES "")
26 set(APRUTIL_LIBRARIES 26 set(APRUTIL_LIBRARIES
27 debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES} 27 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
28 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES} 28 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
29 ) 29 )
30 elseif (DARWIN) 30 elseif (DARWIN)
31 set(APR_LIBRARIES 31 set(APR_LIBRARIES
32 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a 32 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.0.3.7.dylib
33 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a 33 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.0.3.7.dylib
34 ) 34 )
35 set(APRUTIL_LIBRARIES 35 set(APRUTIL_LIBRARIES
36 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a 36 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.0.3.8.dylib
37 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a 37 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.0.3.8.dylib
38 ) 38 )
39 set(APRICONV_LIBRARIES iconv) 39 set(APRICONV_LIBRARIES iconv)
40 else (WINDOWS) 40 else (WINDOWS)
diff --git a/linden/indra/cmake/BerkeleyDB.cmake b/linden/indra/cmake/BerkeleyDB.cmake
index d98e791..de62763 100644
--- a/linden/indra/cmake/BerkeleyDB.cmake
+++ b/linden/indra/cmake/BerkeleyDB.cmake
@@ -6,6 +6,11 @@ set(DB_FIND_REQUIRED ON)
6if (STANDALONE) 6if (STANDALONE)
7 include(FindBerkeleyDB) 7 include(FindBerkeleyDB)
8else (STANDALONE) 8else (STANDALONE)
9 set(DB_LIBRARIES db-4.2) 9 if (LINUX)
10 # Need to add dependency pthread explicitely to support ld.gold.
11 set(DB_LIBRARIES db-4.2 pthread)
12 else (LINUX)
13 set(DB_LIBRARIES db-4.2)
14 endif (LINUX)
10 set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) 15 set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
11endif (STANDALONE) 16endif (STANDALONE)
diff --git a/linden/indra/cmake/Boost.cmake b/linden/indra/cmake/Boost.cmake
index a84a09f..75ac62e 100644
--- a/linden/indra/cmake/Boost.cmake
+++ b/linden/indra/cmake/Boost.cmake
@@ -6,7 +6,6 @@ set(Boost_FIND_REQUIRED ON)
6 6
7if (STANDALONE) 7if (STANDALONE)
8 include(FindBoost) 8 include(FindBoost)
9
10 set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt) 9 set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
11 set(BOOST_REGEX_LIBRARY boost_regex-mt) 10 set(BOOST_REGEX_LIBRARY boost_regex-mt)
12 set(BOOST_SIGNALS_LIBRARY boost_signals-mt) 11 set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
@@ -15,7 +14,7 @@ else (STANDALONE)
15 set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) 14 set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
16 15
17 if (WINDOWS) 16 if (WINDOWS)
18 set(BOOST_VERSION 1_36) 17 set(BOOST_VERSION 1_43)
19 if (MSVC80) 18 if (MSVC80)
20 set(BOOST_PROGRAM_OPTIONS_LIBRARY 19 set(BOOST_PROGRAM_OPTIONS_LIBRARY
21 optimized libboost_program_options-vc80-mt-${BOOST_VERSION} 20 optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
diff --git a/linden/indra/cmake/CMakeLists.txt b/linden/indra/cmake/CMakeLists.txt
index e69de29..4a7d633 100644
--- a/linden/indra/cmake/CMakeLists.txt
+++ b/linden/indra/cmake/CMakeLists.txt
@@ -0,0 +1,119 @@
1# -*- cmake -*-
2
3include(00-Common)
4
5project(cmake)
6
7set(cmake_SOURCE_FILES
8 CMakeLists.txt
9
10 00-Common.cmake
11 APR.cmake
12 Audio.cmake
13 BerkeleyDB.cmake
14 Boost.cmake
15 BuildVersion.cmake
16 CARes.cmake
17 CMakeCopyIfDifferent.cmake
18 CopyBackToSource.cmake
19 CopyWinLibs.cmake
20 CSharpMacros.cmake
21 CURL.cmake
22 DBusGlib.cmake
23 DirectX.cmake
24 ELFIO.cmake
25 ExamplePlugin.cmake
26 EXPAT.cmake
27 FindAPR.cmake
28 FindBerkeleyDB.cmake
29 FindCARes.cmake
30 FindELFIO.cmake
31 FindGooglePerfTools.cmake
32 FindHunSpell.cmake
33 FindJsonCpp.cmake
34 FindLLQtWebkit.cmake
35 FindMono.cmake
36 FindMT.cmake
37 FindMySQL.cmake
38 FindNDOF.cmake
39 FindOpenJPEG.cmake
40 FindSCP.cmake
41 FindTut.cmake
42 FindXmlRpcEpi.cmake
43 FindZLIB.cmake
44 FMOD.cmake
45 FreeType.cmake
46 Glui.cmake
47 Glut.cmake
48 GooglePerfTools.cmake
49 GStreamer010Plugin.cmake
50 HUNSPELL.cmake
51 JPEG.cmake
52 JsonCpp.cmake
53 Linking.cmake
54 LLAddBuildTest.cmake
55 LLAudio.cmake
56 LLCharacter.cmake
57 LLCommon.cmake
58 LLCrashLogger.cmake
59 LLDatabase.cmake
60 LLImage.cmake
61 LLImageJ2COJ.cmake
62 LLInventory.cmake
63 LLMath.cmake
64 LLMessage.cmake
65 LLPlugin.cmake
66 LLPrimitive.cmake
67 LLRender.cmake
68 LLScene.cmake
69 LLUI.cmake
70 LLVFS.cmake
71 LLWindow.cmake
72 LLXML.cmake
73 LScript.cmake
74 MediaPluginBase.cmake
75 MonoDeps.cmake
76 MonoEmbed.cmake
77 Mozlib.cmake
78 MySQL.cmake
79 NDOF.cmake
80 OPENAL.cmake
81 OpenGL.cmake
82 OpenJPEG.cmake
83 OpenSSL.cmake
84 PluginAPI.cmake
85 PNG.cmake
86 Prebuilt.cmake
87 PulseAudio.cmake
88 Python.cmake
89 QuickTimePlugin.cmake
90 RunBuildTest.cmake
91 TemplateCheck.cmake
92 Tut.cmake
93 UI.cmake
94 UnixInstall.cmake
95 Variables.cmake
96 ViewerArtwork.cmake
97 ViewerMiscLibs.cmake
98 WebKitLibPlugin.cmake
99 XmlRpcEpi.cmake
100 ZLIB.cmake
101 )
102
103source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
104
105set(master_SOURCE_FILES
106 ../CMakeLists.txt
107 ../develop.py
108 )
109
110source_group("Master Rules" FILES ${master_SOURCE_FILES})
111
112set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES}
113 PROPERTIES HEADER_FILE_ONLY TRUE)
114
115add_library(cmake
116 cmake_dummy.cpp
117 ${cmake_SOURCE_FILES}
118 ${master_SOURCE_FILES}
119 )
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
index 13530d8..78c7c96 100644
--- a/linden/indra/cmake/CopyWinLibs.cmake
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -6,6 +6,7 @@
6 6
7include(CMakeCopyIfDifferent) 7include(CMakeCopyIfDifferent)
8 8
9# Copying vivox's alut.dll breaks inworld audio, never use it
9set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") 10set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
10set(vivox_files 11set(vivox_files
11 SLVoice.exe 12 SLVoice.exe
@@ -14,75 +15,84 @@ set(vivox_files
14 ortp.dll 15 ortp.dll
15 wrap_oal.dll 16 wrap_oal.dll
16 ) 17 )
18copy_if_different(
19 ${vivox_src_dir}
20 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
21 out_targets
22 ${vivox_files}
23 )
24set(all_targets ${all_targets} ${out_targets})
17 25
18set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") 26set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
19set(debug_files 27set(debug_files
20 alut.dll 28 alut.dll
21 freebl3.dll
22 js3250.dll
23 nspr4.dll
24 nss3.dll
25 nssckbi.dll
26 openal32.dll 29 openal32.dll
27 openjpegd.dll 30 openjpegd.dll
28 plc4.dll 31 libhunspell.dll
29 plds4.dll 32 libapr-1.dll
30 smime3.dll 33 libaprutil-1.dll
31 softokn3.dll 34 libapriconv-1.dll
32 ssl3.dll 35
33 xpcom.dll 36 # gstreamer streaming files below
34 xul.dll 37 avcodec-gpl-52.dll
35 windbgdlg.exe 38 avdevice-gpl-52.dll
36 iconv.dll 39 avfilter-gpl-1.dll
37 libxml2.dll 40 avformat-gpl-52.dll
38 libcairo-2.dll 41 avutil-gpl-50.dll
42 iconv.dll
43 liba52-0.dll
44 libbz2.dll
45 libcelt-0.dll
46 libdca-0.dll
47 libexpat-1.dll
39 libfaad-2.dll 48 libfaad-2.dll
40 libgio-2.0-0.dll 49 libFLAC-8.dll
41 libglib-2.0-0.dll
42 libgmodule-2.0-0.dll
43 libgobject-2.0-0.dll
44 libgthread-2.0-0.dll
45 charset.dll
46 intl.dll
47 libgcrypt-11.dll 50 libgcrypt-11.dll
51 libgio-2.0-0.dll
52 libglib-2.0-0.dll
53 libgmodule-2.0-0.dll
48 libgnutls-26.dll 54 libgnutls-26.dll
55 libgobject-2.0-0.dll
49 libgpg-error-0.dll 56 libgpg-error-0.dll
50 libgstapp.dll 57 libgstapp-0.10.dll
51 libgstaudio.dll
52 libgstaudio-0.10.dll 58 libgstaudio-0.10.dll
53 libgstbase-0.10.dll 59 libgstbase-0.10.dll
54 libgstcdda.dll
55 libgstcontroller-0.10.dll 60 libgstcontroller-0.10.dll
56 libgstdataprotocol-0.10.dll 61 libgstdataprotocol-0.10.dll
57 libgstdshow.dll 62 libgstfft-0.10.dll
58 libgstfft.dll 63 libgstinterfaces-0.10.dll
59 libgstinterfaces.dll
60 libgstnet-0.10.dll 64 libgstnet-0.10.dll
61 libgstnetbuffer.dll 65 libgstnetbuffer-0.10.dll
62 libgstpbutils.dll 66 libgstpbutils-0.10.dll
67 libgstphotography-0.10.dll
63 libgstreamer-0.10.dll 68 libgstreamer-0.10.dll
64 libgstriff.dll 69 libgstriff-0.10.dll
65 libgstrtp.dll 70 libgstrtp-0.10.dll
66 libgstrtsp.dll 71 libgstrtsp-0.10.dll
67 libgstsdp.dll 72 libgstsdp-0.10.dll
68 libgsttag.dll 73 libgstsignalprocessor-0.10.dll
69 libgstvideo.dll 74 libgsttag-0.10.dll
70 libjpeg.dll 75 libgstvideo-0.10.dll
71 libmp3lame-0.dll 76 libgthread-2.0-0.dll
77 libmms-0.dll
78 libmpeg2-0.dll
72 libneon-27.dll 79 libneon-27.dll
73 libogg-0.dll 80 libogg-0.dll
74 liboil-0.3-0.dll 81 liboil-0.3-0.dll
75 libopenjpeg-2.dll 82 libsoup-2.4-1.dll
76 libpng12-0.dll 83 libtasn1-3.dll
77 libschroedinger-1.0-0.dll
78 libspeex-1.dll
79 libtheora-0.dll 84 libtheora-0.dll
85 libtheoradec-1.dll
80 libvorbis-0.dll 86 libvorbis-0.dll
81 libvorbisenc-2.dll 87 libvorbisenc-2.dll
88 libvorbisfile-3.dll
89 libwavpack-1.dll
90 libx264-67.dll
82 libxml2-2.dll 91 libxml2-2.dll
83 glew32.dll 92 libxml2.dll
84 xvidcore.dll 93 SDL.dll
85 zlib1.dll 94 xvidcore.dll
95 z.dll
86 ) 96 )
87 97
88copy_if_different( 98copy_if_different(
@@ -93,81 +103,240 @@ copy_if_different(
93 ) 103 )
94set(all_targets ${all_targets} ${out_targets}) 104set(all_targets ${all_targets} ${out_targets})
95 105
106# Debug config runtime files required for the plugin test mule
107set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
108set(plugintest_debug_files
109 libeay32.dll
110 qtcored4.dll
111 qtguid4.dll
112 qtnetworkd4.dll
113 qtopengld4.dll
114 qtwebkitd4.dll
115 qtxmlpatternsd4.dll
116 ssleay32.dll
117 )
96copy_if_different( 118copy_if_different(
97 ${vivox_src_dir} 119 ${plugintest_debug_src_dir}
98 "${CMAKE_CURRENT_BINARY_DIR}/Debug" 120 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug"
99 out_targets 121 out_targets
100 ${vivox_files} 122 ${plugintest_debug_files}
123 )
124set(all_targets ${all_targets} ${out_targets})
125
126# Debug config runtime files required for the plugin test mule (Qt image format plugins)
127set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/imageformats")
128set(plugintest_debug_files
129 qgifd4.dll
130 qicod4.dll
131 qjpegd4.dll
132 qmngd4.dll
133 qsvgd4.dll
134 qtiffd4.dll
135 )
136copy_if_different(
137 ${plugintest_debug_src_dir}
138 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug/imageformats"
139 out_targets
140 ${plugintest_debug_files}
141 )
142set(all_targets ${all_targets} ${out_targets})
143
144copy_if_different(
145 ${plugintest_debug_src_dir}
146 "${CMAKE_CURRENT_BINARY_DIR}/llplugin/imageformats"
147 out_targets
148 ${plugintest_debug_files}
149 )
150set(all_targets ${all_targets} ${out_targets})
151
152# Release & ReleaseDebInfo config runtime files required for the plugin test mule
153set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
154set(plugintest_release_files
155 libeay32.dll
156 qtcore4.dll
157 qtgui4.dll
158 qtnetwork4.dll
159 qtopengl4.dll
160 qtwebkit4.dll
161 qtxmlpatterns4.dll
162 ssleay32.dll
163 )
164copy_if_different(
165 ${plugintest_release_src_dir}
166 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release"
167 out_targets
168 ${plugintest_release_files}
169 )
170set(all_targets ${all_targets} ${out_targets})
171
172copy_if_different(
173 ${plugintest_release_src_dir}
174 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo"
175 out_targets
176 ${plugintest_release_files}
177 )
178set(all_targets ${all_targets} ${out_targets})
179
180# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
181set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats")
182set(plugintest_release_files
183 qgif4.dll
184 qico4.dll
185 qjpeg4.dll
186 qmng4.dll
187 qsvg4.dll
188 qtiff4.dll
189 )
190copy_if_different(
191 ${plugintest_release_src_dir}
192 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release/imageformats"
193 out_targets
194 ${plugintest_release_files}
195 )
196set(all_targets ${all_targets} ${out_targets})
197
198copy_if_different(
199 ${plugintest_release_src_dir}
200 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo/imageformats"
201 out_targets
202 ${plugintest_release_files}
203 )
204set(all_targets ${all_targets} ${out_targets})
205
206copy_if_different(
207 ${plugintest_release_src_dir}
208 "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats"
209 out_targets
210 ${plugintest_release_files}
211 )
212set(all_targets ${all_targets} ${out_targets})
213
214copy_if_different(
215 ${plugintest_release_src_dir}
216 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin/imageformats"
217 out_targets
218 ${plugintest_release_files}
219 )
220set(all_targets ${all_targets} ${out_targets})
221
222# Debug config runtime files required for the plugins
223set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
224set(plugins_debug_files
225 libeay32.dll
226 qtcored4.dll
227 qtguid4.dll
228 qtnetworkd4.dll
229 qtopengld4.dll
230 qtwebkitd4.dll
231 qtxmlpatternsd4.dll
232 ssleay32.dll
233 )
234copy_if_different(
235 ${plugins_debug_src_dir}
236 "${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
237 out_targets
238 ${plugins_debug_files}
239 )
240set(all_targets ${all_targets} ${out_targets})
241
242# Release & ReleaseDebInfo config runtime files required for the plugins
243set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
244set(plugins_release_files
245 libeay32.dll
246 qtcore4.dll
247 qtgui4.dll
248 qtnetwork4.dll
249 qtopengl4.dll
250 qtwebkit4.dll
251 qtxmlpatterns4.dll
252 ssleay32.dll
253 )
254copy_if_different(
255 ${plugins_release_src_dir}
256 "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
257 out_targets
258 ${plugins_release_files}
259 )
260set(all_targets ${all_targets} ${out_targets})
261
262copy_if_different(
263 ${plugins_release_src_dir}
264 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
265 out_targets
266 ${plugins_release_files}
101 ) 267 )
102set(all_targets ${all_targets} ${out_targets}) 268set(all_targets ${all_targets} ${out_targets})
103 269
104set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") 270set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
105set(release_files 271set(release_files
106 alut.dll 272 alut.dll
107 freebl3.dll
108 js3250.dll
109 nspr4.dll
110 nss3.dll
111 nssckbi.dll
112 openal32.dll 273 openal32.dll
113 openjpeg.dll 274 openjpeg.dll
114 plc4.dll 275 libhunspell.dll
115 plds4.dll 276 libapr-1.dll
116 smime3.dll 277 libaprutil-1.dll
117 softokn3.dll 278 libapriconv-1.dll
118 ssl3.dll 279
119 xpcom.dll 280 # gstreamer streaming files below
120 xul.dll 281 avcodec-gpl-52.dll
121 iconv.dll 282 avdevice-gpl-52.dll
122 libxml2.dll 283 avfilter-gpl-1.dll
123 libcairo-2.dll 284 avformat-gpl-52.dll
285 avutil-gpl-50.dll
286 iconv.dll
287 liba52-0.dll
288 libbz2.dll
289 libcelt-0.dll
290 libdca-0.dll
291 libexpat-1.dll
124 libfaad-2.dll 292 libfaad-2.dll
125 libgio-2.0-0.dll 293 libFLAC-8.dll
126 libglib-2.0-0.dll
127 libgmodule-2.0-0.dll
128 libgobject-2.0-0.dll
129 libgthread-2.0-0.dll
130 charset.dll
131 intl.dll
132 libgcrypt-11.dll 294 libgcrypt-11.dll
295 libgio-2.0-0.dll
296 libglib-2.0-0.dll
297 libgmodule-2.0-0.dll
133 libgnutls-26.dll 298 libgnutls-26.dll
299 libgobject-2.0-0.dll
134 libgpg-error-0.dll 300 libgpg-error-0.dll
135 libgstapp.dll 301 libgstapp-0.10.dll
136 libgstaudio.dll
137 libgstaudio-0.10.dll 302 libgstaudio-0.10.dll
138 libgstbase-0.10.dll 303 libgstbase-0.10.dll
139 libgstcdda.dll
140 libgstcontroller-0.10.dll 304 libgstcontroller-0.10.dll
141 libgstdataprotocol-0.10.dll 305 libgstdataprotocol-0.10.dll
142 libgstdshow.dll 306 libgstfft-0.10.dll
143 libgstfft.dll 307 libgstinterfaces-0.10.dll
144 libgstinterfaces.dll
145 libgstnet-0.10.dll 308 libgstnet-0.10.dll
146 libgstnetbuffer.dll 309 libgstnetbuffer-0.10.dll
147 libgstpbutils.dll 310 libgstpbutils-0.10.dll
311 libgstphotography-0.10.dll
148 libgstreamer-0.10.dll 312 libgstreamer-0.10.dll
149 libgstriff.dll 313 libgstriff-0.10.dll
150 libgstrtp.dll 314 libgstrtp-0.10.dll
151 libgstrtsp.dll 315 libgstrtsp-0.10.dll
152 libgstsdp.dll 316 libgstsdp-0.10.dll
153 libgsttag.dll 317 libgstsignalprocessor-0.10.dll
154 libgstvideo.dll 318 libgsttag-0.10.dll
155 libjpeg.dll 319 libgstvideo-0.10.dll
156 libmp3lame-0.dll 320 libgthread-2.0-0.dll
321 libmms-0.dll
322 libmpeg2-0.dll
157 libneon-27.dll 323 libneon-27.dll
158 libogg-0.dll 324 libogg-0.dll
159 liboil-0.3-0.dll 325 liboil-0.3-0.dll
160 libopenjpeg-2.dll 326 libsoup-2.4-1.dll
161 libpng12-0.dll 327 libtasn1-3.dll
162 libschroedinger-1.0-0.dll
163 libspeex-1.dll
164 libtheora-0.dll 328 libtheora-0.dll
329 libtheoradec-1.dll
165 libvorbis-0.dll 330 libvorbis-0.dll
166 libvorbisenc-2.dll 331 libvorbisenc-2.dll
332 libvorbisfile-3.dll
333 libwavpack-1.dll
334 libx264-67.dll
167 libxml2-2.dll 335 libxml2-2.dll
168 glew32.dll 336 libxml2.dll
169 xvidcore.dll 337 SDL.dll
170 zlib1.dll 338 xvidcore.dll
339 z.dll
171 ) 340 )
172 341
173copy_if_different( 342copy_if_different(
diff --git a/linden/indra/cmake/DBusGlib.cmake b/linden/indra/cmake/DBusGlib.cmake
index dfda0ad..b78a0b1 100644
--- a/linden/indra/cmake/DBusGlib.cmake
+++ b/linden/indra/cmake/DBusGlib.cmake
@@ -7,6 +7,7 @@ if (STANDALONE)
7 pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1) 7 pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
8 8
9elseif (LINUX) 9elseif (LINUX)
10 use_prebuilt_binary(glib) # dbusglib needs glib
10 use_prebuilt_binary(dbusglib) 11 use_prebuilt_binary(dbusglib)
11 set(DBUSGLIB_FOUND ON FORCE BOOL) 12 set(DBUSGLIB_FOUND ON FORCE BOOL)
12 set(DBUSGLIB_INCLUDE_DIRS 13 set(DBUSGLIB_INCLUDE_DIRS
diff --git a/linden/indra/cmake/ExamplePlugin.cmake b/linden/indra/cmake/ExamplePlugin.cmake
new file mode 100644
index 0000000..599787a
--- /dev/null
+++ b/linden/indra/cmake/ExamplePlugin.cmake
@@ -0,0 +1,16 @@
1# -*- cmake -*-
2include(Linking)
3include(Prebuilt)
4
5if (STANDALONE)
6 set(EXAMPLEPLUGIN OFF CACHE BOOL
7 "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.")
8else (STANDALONE)
9 set(EXAMPLEPLUGIN ON CACHE BOOL
10 "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.")
11endif (STANDALONE)
12
13if (WINDOWS)
14elseif (DARWIN)
15elseif (LINUX)
16endif (WINDOWS)
diff --git a/linden/indra/cmake/FindHunSpell.cmake b/linden/indra/cmake/FindHunSpell.cmake
new file mode 100644
index 0000000..d41f9cf
--- /dev/null
+++ b/linden/indra/cmake/FindHunSpell.cmake
@@ -0,0 +1,34 @@
1FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell.hxx
2 /usr/local/include/hunspell
3 /usr/local/include
4 /usr/include/hunspell
5 /usr/include
6 )
7
8SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2)
9FIND_LIBRARY(HUNSPELL_LIBRARY
10 NAMES ${HUNSPELL_NAMES}
11 PATHS /usr/lib /usr/local/lib
12 )
13
14IF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
15 SET(HUNSPELL_LIBRARIES ${HUNSPELL_LIBRARY})
16 SET(HUNSPELL_FOUND "YES")
17ELSE(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
18 SET(HUNSPELL_FOUND "NO")
19ENDIF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
20
21IF(HUNSPELL_FOUND)
22 IF(NOT HUNSPELL_FIND_QUIETLY)
23 MESSAGE(STATUS "Found Hunspell: ${HUNSPELL_LIBRARIES}")
24 ENDIF(NOT HUNSPELL_FIND_QUIETLY)
25ELSE(HUNSPELL_FOUND)
26 IF(HUNSPELL_FIND_REQUIRED)
27 MESSAGE(FATAL_ERROR "Could not find HunSpell library")
28 ENDIF(HUNSPELL_FIND_REQUIRED)
29ENDIF(HUNSPELL_FOUND)
30
31MARK_AS_ADVANCED(
32 HUNSPELL_LIBRARY
33 HUNSPELL_INCLUDE_DIR
34 )
diff --git a/linden/indra/cmake/FindJsonCpp.cmake b/linden/indra/cmake/FindJsonCpp.cmake
new file mode 100644
index 0000000..cf84b30
--- /dev/null
+++ b/linden/indra/cmake/FindJsonCpp.cmake
@@ -0,0 +1,60 @@
1# -*- cmake -*-
2
3# - Find JSONCpp
4# Find the JSONCpp includes and library
5# This module defines
6# JSONCPP_INCLUDE_DIR, where to find json.h, etc.
7# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
8# JSONCPP_FOUND, If false, do not try to use jsoncpp.
9# also defined, but not for general use are
10# JSONCPP_LIBRARY, where to find the jsoncpp library.
11
12FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h
13/usr/local/include
14/usr/include
15)
16
17# Get the GCC compiler version
18EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
19 ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
20 OUTPUT_VARIABLE _gcc_COMPILER_VERSION
21 OUTPUT_STRIP_TRAILING_WHITESPACE
22 )
23
24# Try to find a library that was compiled with the same compiler version as we currently use.
25SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
26IF (STANDALONE)
27 # On standalone, assume that the system installed library was compiled with the used compiler.
28 SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
29ENDIF (STANDALONE)
30FIND_LIBRARY(JSONCPP_LIBRARY
31 NAMES ${JSONCPP_NAMES}
32 PATHS /usr/lib /usr/local/lib
33 )
34
35IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
36 SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
37 SET(JSONCPP_FOUND "YES")
38ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
39 SET(JSONCPP_FOUND "NO")
40ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
41
42
43IF (JSONCPP_FOUND)
44 IF (NOT JSONCPP_FIND_QUIETLY)
45 MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}")
46 ENDIF (NOT JSONCPP_FIND_QUIETLY)
47ELSE (JSONCPP_FOUND)
48 IF (JSONCPP_FIND_REQUIRED)
49 MESSAGE(FATAL_ERROR "Could not find JSONCpp library")
50 ENDIF (JSONCPP_FIND_REQUIRED)
51ENDIF (JSONCPP_FOUND)
52
53# Deprecated declarations.
54SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} )
55GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH)
56
57MARK_AS_ADVANCED(
58 JSONCPP_LIBRARY
59 JSONCPP_INCLUDE_DIR
60 )
diff --git a/linden/indra/cmake/FindLLQtWebkit.cmake b/linden/indra/cmake/FindLLQtWebkit.cmake
new file mode 100644
index 0000000..c747ec3
--- /dev/null
+++ b/linden/indra/cmake/FindLLQtWebkit.cmake
@@ -0,0 +1,62 @@
1# -*- cmake -*-
2
3# - Find llqtwebkit
4# Find the llqtwebkit includes and library
5# This module defines
6# LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
7# LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
8# LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
9# also defined, but not for general use are
10# LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
11# LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
12# LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
13# before compiling code that includes llqtwebkit library files.
14
15# Try to use pkg-config first.
16# This allows to have two different libllqtwebkit packages installed:
17# one for viewer 2.x and one for viewer 1.x.
18include(FindPkgConfig)
19if (PKG_CONFIG_FOUND)
20 if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
21 set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
22 else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
23 set(_PACKAGE_ARGS libllqtwebkit)
24 endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
25 if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
26 # As virtually nobody will have a pkg-config file for this, do this check always quiet.
27 # Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
28 set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
29 endif ()
30 pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
31endif (PKG_CONFIG_FOUND)
32set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
33
34find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
35
36find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
37
38if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
39 set(LLQTWEBKIT_LIBRARIES llqtwebkit)
40 get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
41endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
42
43# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
44# to TRUE if all listed variables are TRUE.
45include(FindPackageHandleStandardArgs)
46find_package_handle_standard_args(
47 LLQTWEBKIT
48 DEFAULT_MSG
49 LLQTWEBKIT_LIBRARY
50 LLQTWEBKIT_INCLUDE_DIR
51 LLQTWEBKIT_LIBRARIES
52 LLQTWEBKIT_LIBRARY_DIRS
53 )
54
55mark_as_advanced(
56 LLQTWEBKIT_LIBRARY
57 LLQTWEBKIT_INCLUDE_DIR
58 LLQTWEBKIT_LIBRARIES
59 LLQTWEBKIT_LIBRARY_DIRS
60 LLQTWEBKIT_DEFINITIONS
61 )
62
diff --git a/linden/indra/cmake/FindNDOF.cmake b/linden/indra/cmake/FindNDOF.cmake
new file mode 100644
index 0000000..f980e34
--- /dev/null
+++ b/linden/indra/cmake/FindNDOF.cmake
@@ -0,0 +1,39 @@
1# -*- cmake -*-
2
3# - Find NDOF
4# Find the NDOF includes and library
5# This module defines
6# NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
7# NDOF_LIBRARY, the library needed to use NDOF.
8# NDOF_FOUND, If false, do not try to use NDOF.
9
10find_path(NDOF_INCLUDE_DIR ndofdev_external.h
11 PATH_SUFFIXES ndofdev
12 )
13
14set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
15find_library(NDOF_LIBRARY
16 NAMES ${NDOF_NAMES}
17 )
18
19if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
20 set(NDOF_FOUND "YES")
21else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
22 set(NDOF_FOUND "NO")
23endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
24
25
26if (NDOF_FOUND)
27 if (NOT NDOF_FIND_QUIETLY)
28 message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
29 endif (NOT NDOF_FIND_QUIETLY)
30else (NDOF_FOUND)
31 if (NDOF_FIND_REQUIRED)
32 message(FATAL_ERROR "Could not find NDOF library!")
33 endif (NDOF_FIND_REQUIRED)
34endif (NDOF_FOUND)
35
36mark_as_advanced(
37 NDOF_LIBRARY
38 NDOF_INCLUDE_DIR
39 )
diff --git a/linden/indra/cmake/FindTut.cmake b/linden/indra/cmake/FindTut.cmake
new file mode 100644
index 0000000..5ac7ec0
--- /dev/null
+++ b/linden/indra/cmake/FindTut.cmake
@@ -0,0 +1,33 @@
1# -*- cmake -*-
2
3# - Find Tut
4# Find the Tut unit test framework includes and library
5# This module defines
6# TUT_INCLUDE_DIR, where to find tut/tut.hpp, etc.
7# TUT_FOUND, If false, do not try to use Tut.
8
9find_path(TUT_INCLUDE_DIR tut/tut.hpp
10 NO_SYSTEM_ENVIRONMENT_PATH
11)
12
13IF (TUT_INCLUDE_DIR)
14 SET(TUT_FOUND "YES")
15ELSE (TUT_INCLUDE_DIR)
16 SET(TUT_FOUND "NO")
17ENDIF (TUT_INCLUDE_DIR)
18
19IF (TUT_FOUND)
20 IF (NOT TUT_FIND_QUIETLY)
21 MESSAGE(STATUS "Found Tut: ${TUT_INCLUDE_DIR}")
22 SET(TUT_FIND_QUIETLY TRUE) # Only alert us the first time
23 ENDIF (NOT TUT_FIND_QUIETLY)
24ELSE (TUT_FOUND)
25 IF (TUT_FIND_REQUIRED)
26 MESSAGE(FATAL_ERROR "Could not find Tut")
27 ENDIF (TUT_FIND_REQUIRED)
28ENDIF (TUT_FOUND)
29
30MARK_AS_ADVANCED(
31 TUT_INCLUDE_DIR
32)
33
diff --git a/linden/indra/cmake/FindZLIB.cmake b/linden/indra/cmake/FindZLIB.cmake
new file mode 100644
index 0000000..6d630f1
--- /dev/null
+++ b/linden/indra/cmake/FindZLIB.cmake
@@ -0,0 +1,46 @@
1# -*- cmake -*-
2
3# - Find zlib
4# Find the ZLIB includes and library
5# This module defines
6# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
7# ZLIB_LIBRARIES, the libraries needed to use zlib.
8# ZLIB_FOUND, If false, do not try to use zlib.
9#
10# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
11# because it doesn't look up the version of zlib, resulting in a dramatic
12# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
13#
14# Note: Since this file is only used for standalone, the windows
15# specific parts were left out.
16
17FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
18 NO_SYSTEM_ENVIRONMENT_PATH
19 )
20
21FIND_LIBRARY(ZLIB_LIBRARY z)
22
23if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
24 SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
25 SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
26 SET(ZLIB_FOUND "YES")
27else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
28 SET(ZLIB_FOUND "NO")
29endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
30
31if (ZLIB_FOUND)
32 if (NOT ZLIB_FIND_QUIETLY)
33 message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
34 SET(ZLIB_FIND_QUIETLY TRUE)
35 endif (NOT ZLIB_FIND_QUIETLY)
36else (ZLIB_FOUND)
37 if (ZLIB_FIND_REQUIRED)
38 message(FATAL_ERROR "Could not find ZLIB library")
39 endif (ZLIB_FIND_REQUIRED)
40endif (ZLIB_FOUND)
41
42mark_as_advanced(
43 ZLIB_LIBRARY
44 ZLIB_INCLUDE_DIR
45 )
46
diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake
deleted file mode 100644
index d318f28..0000000
--- a/linden/indra/cmake/GStreamer.cmake
+++ /dev/null
@@ -1,115 +0,0 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4 # Maybe libxml and glib should have their own .cmake files
5 use_prebuilt_binary(libxml)
6 use_prebuilt_binary(glib)
7
8 set(GSTREAMER_FOUND ON FORCE BOOL)
9 set(GSTREAMER_PLUGINS_BASE_FOUND ON FORCE BOOL)
10
11 use_prebuilt_binary(gstreamer)
12 use_prebuilt_binary(gstreamer-plugins)
13
14if (WINDOWS)
15
16 use_prebuilt_binary(iconv)
17 set(GSTREAMER_FOUND ON FORCE BOOL)
18 set(GSTREAMER_INCLUDE_DIRS
19 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib
20 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gio
21 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gobject
22 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
23 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/iconv
24 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gst
25 )
26
27 set(GSTREAMER_LIBRARIES
28 glib-2.0
29 gio-2.0
30 gmodule-2.0
31 gobject-2.0
32 gthread-2.0
33 libgstvideo.lib
34 libgsttag.lib
35 libgstsdp.lib
36 libgstrtsp.lib
37 libgstrtp.lib
38 libgstriff.lib
39 libgstreamer-0.10.lib
40 libgstpbutils.lib
41 libgstnetbuffer.lib
42 libgstnet-0.10.lib
43 libgstinterfaces.lib
44 libgstdshow.lib
45 libgstdataprotocol-0.10.lib
46 libgstcontroller-0.10.lib
47 libgstbase-0.10.lib
48 libgstaudio.lib
49 libgstapp.lib
50 libxml2
51 libxml2_a
52 libxml2_a_dll
53 iconv
54 iconv_a
55 )
56
57else (WINDOWS)
58
59 set(GSTREAMER_INCLUDE_DIRS
60 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
61 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
62 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/glib
63 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/gobject
64 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
65 )
66
67 if (DARWIN) # Mac
68
69 use_prebuilt_binary(flac)
70 use_prebuilt_binary(liboil)
71 use_prebuilt_binary(neon)
72 use_prebuilt_binary(theora)
73
74 set(GSTREAMER_LIBRARIES
75 gstvideo-0.10
76 gstaudio-0.10
77 gstbase-0.10
78 gstreamer-0.10
79 gobject-2.0
80 gmodule-2.0
81 gthread-2.0
82 glib-2.0
83 xml2.2
84 )
85
86 else (DARWIN) # Linux
87
88 use_prebuilt_binary(liboil)
89 use_prebuilt_binary(theora)
90
91 set(GSTREAMER_LIBRARIES
92 gstvideo-0.10
93 gstaudio-0.10
94 gstbase-0.10
95 gstreamer-0.10
96 gobject-2.0
97 gmodule-2.0
98 dl
99 gthread-2.0
100 rt
101 glib-2.0
102 gio-2.0
103 )
104
105 endif (DARWIN)
106
107endif (WINDOWS)
108
109if (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND)
110 set(GSTREAMER ON CACHE BOOL "Build with GStreamer streaming media support.")
111endif (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND)
112
113if (GSTREAMER)
114 add_definitions(-DLL_GSTREAMER_ENABLED=1)
115endif (GSTREAMER)
diff --git a/linden/indra/cmake/GStreamer010Plugin.cmake b/linden/indra/cmake/GStreamer010Plugin.cmake
new file mode 100644
index 0000000..9d2c553
--- /dev/null
+++ b/linden/indra/cmake/GStreamer010Plugin.cmake
@@ -0,0 +1,76 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4if (STANDALONE)
5 include(FindPkgConfig)
6
7 pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
8 pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
9
10else (STANDALONE)
11
12 # Possibly libxml and glib should have their own .cmake file instead...
13 use_prebuilt_binary(gstreamer) # includes glib, libxml, and iconv on Windows
14 use_prebuilt_binary(gstreamer-plugins)
15 set(GSTREAMER010_FOUND ON FORCE BOOL)
16 set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
17 if (WINDOWS)
18 set(GSTREAMER010_INCLUDE_DIRS
19 ${LIBS_PREBUILT_DIR}/include/gstreamer-0.10
20 ${LIBS_PREBUILT_DIR}/include/glib
21 ${LIBS_PREBUILT_DIR}/include/libxml2
22 )
23 else (WINDOWS)
24 use_prebuilt_binary(glib) # gstreamer needs glib
25 use_prebuilt_binary(libxml)
26 set(GSTREAMER010_INCLUDE_DIRS
27 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
28 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
29 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
30 )
31 endif (WINDOWS)
32
33endif (STANDALONE)
34
35if (WINDOWS)
36 # We don't need to explicitly link against gstreamer itself, because
37 # LLMediaImplGStreamer probes for the system's copy at runtime.
38 set(GSTREAMER010_LIBRARIES
39 gstaudio-0.10.lib
40 gstbase-0.10.lib
41 gstreamer-0.10.lib
42 gstvideo-0.10.lib #slvideoplugin
43 gstinterfaces-0.10.lib
44 gobject-2.0
45 gmodule-2.0
46 gthread-2.0
47 glib-2.0
48 )
49else (WINDOWS)
50 # We don't need to explicitly link against gstreamer itself, because
51 # LLMediaImplGStreamer probes for the system's copy at runtime.
52 set(GSTREAMER010_LIBRARIES
53 gstvideo-0.10
54 gstaudio-0.10
55 gstbase-0.10
56 gstreamer-0.10
57 gobject-2.0
58 gmodule-2.0
59 dl
60 gthread-2.0
61 rt
62 glib-2.0
63 )
64
65
66endif (WINDOWS)
67
68
69if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
70 set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")
71 add_definitions(-DLL_GSTREAMER010_ENABLED=1)
72endif (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
73
74
75
76
diff --git a/linden/indra/cmake/Glui.cmake b/linden/indra/cmake/Glui.cmake
new file mode 100644
index 0000000..f62a568
--- /dev/null
+++ b/linden/indra/cmake/Glui.cmake
@@ -0,0 +1,28 @@
1# -*- cmake -*-
2include(Linking)
3include(Prebuilt)
4
5if (STANDALONE)
6 set(GLUI OFF CACHE BOOL
7 "GLUI support for the llplugin/llmedia test apps.")
8else (STANDALONE)
9 use_prebuilt_binary(glui)
10 set(GLUI ON CACHE BOOL
11 "GLUI support for the llplugin/llmedia test apps.")
12endif (STANDALONE)
13
14if (LINUX)
15 set(GLUI ON CACHE BOOL
16 "llplugin media apps HACK for Linux.")
17endif (LINUX)
18
19if (DARWIN OR LINUX)
20 set(GLUI_LIBRARY
21 glui)
22endif (DARWIN OR LINUX)
23
24if (WINDOWS)
25 set(GLUI_LIBRARY
26 debug glui32.lib
27 optimized glui32.lib)
28endif (WINDOWS)
diff --git a/linden/indra/cmake/Glut.cmake b/linden/indra/cmake/Glut.cmake
new file mode 100644
index 0000000..314da30
--- /dev/null
+++ b/linden/indra/cmake/Glut.cmake
@@ -0,0 +1,19 @@
1# -*- cmake -*-
2include(Linking)
3include(Prebuilt)
4
5if (WINDOWS)
6 use_prebuilt_binary(freeglut)
7 set(GLUT_LIBRARY
8 debug freeglut_static.lib
9 optimized freeglut_static.lib)
10endif (WINDOWS)
11
12if (LINUX)
13 FIND_LIBRARY(GLUT_LIBRARY glut)
14endif (LINUX)
15
16if (DARWIN)
17 include(CMakeFindFrameworks)
18 find_library(GLUT_LIBRARY GLUT)
19endif (DARWIN)
diff --git a/linden/indra/cmake/HUNSPELL.cmake b/linden/indra/cmake/HUNSPELL.cmake
new file mode 100644
index 0000000..cd5d7e0
--- /dev/null
+++ b/linden/indra/cmake/HUNSPELL.cmake
@@ -0,0 +1,16 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4if (STANDALONE)
5 include(FindHunSpell)
6else (STANDALONE)
7 use_prebuilt_binary(hunspell)
8
9 set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell)
10
11 if (LINUX OR DARWIN)
12 set(HUNSPELL_LIBRARY hunspell-1.2)
13 else (LINUX OR DARWIN)
14 set(HUNSPELL_LIBRARY libhunspell)
15 endif (LINUX OR DARWIN)
16endif (STANDALONE)
diff --git a/linden/indra/cmake/JsonCpp.cmake b/linden/indra/cmake/JsonCpp.cmake
new file mode 100644
index 0000000..fe6369d
--- /dev/null
+++ b/linden/indra/cmake/JsonCpp.cmake
@@ -0,0 +1,28 @@
1# -*- cmake -*-
2
3include(Prebuilt)
4
5set(JSONCPP_FIND_QUIETLY ON)
6set(JSONCPP_FIND_REQUIRED ON)
7
8if (STANDALONE)
9 include(FindJsonCpp)
10else (STANDALONE)
11 use_prebuilt_binary(jsoncpp)
12 if (WINDOWS)
13 if (MSVC80)
14 set(JSONCPP_LIBRARIES
15 debug json_vc80d
16 optimized json_vc80)
17 elseif (MSVC90)
18 set(JSONCPP_LIBRARIES
19 debug json_vc90d
20 optimized json_vc90)
21 endif(MSVC80)
22 elseif (DARWIN)
23 set(JSONCPP_LIBRARIES json_mac-universal-gcc_libmt)
24 elseif (LINUX)
25 set(JSONCPP_LIBRARIES jsoncpp)
26 endif (WINDOWS)
27 set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/jsoncpp)
28endif (STANDALONE)
diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake
index 625e212..89b790c 100644
--- a/linden/indra/cmake/LLAudio.cmake
+++ b/linden/indra/cmake/LLAudio.cmake
@@ -1,11 +1,9 @@
1# -*- cmake -*- 1# -*- cmake -*-
2 2
3include(Audio) 3include(Audio)
4include(OPENAL)
5 4
6set(LLAUDIO_INCLUDE_DIRS 5set(LLAUDIO_INCLUDE_DIRS
7 ${LIBS_OPEN_DIR}/llaudio 6 ${LIBS_OPEN_DIR}/llaudio
8 ${OPENAL_INCLUDE_DIRS}
9 ) 7 )
10 8
11set(LLAUDIO_LIBRARIES llaudio ${OPENAL_LIBRARIES}) 9set(LLAUDIO_LIBRARIES llaudio ${OPENAL_LIBRARIES})
diff --git a/linden/indra/cmake/LLCommon.cmake b/linden/indra/cmake/LLCommon.cmake
index 410766e..d87d3c0 100644
--- a/linden/indra/cmake/LLCommon.cmake
+++ b/linden/indra/cmake/LLCommon.cmake
@@ -7,9 +7,15 @@ include(ZLIB)
7 7
8set(LLCOMMON_INCLUDE_DIRS 8set(LLCOMMON_INCLUDE_DIRS
9 ${LIBS_OPEN_DIR}/llcommon 9 ${LIBS_OPEN_DIR}/llcommon
10 ${APRUTIL_INCLUDE_DIR}
11 ${APR_INCLUDE_DIR} 10 ${APR_INCLUDE_DIR}
12 ${Boost_INCLUDE_DIRS} 11 ${Boost_INCLUDE_DIRS}
13 ) 12 )
14 13
15set(LLCOMMON_LIBRARIES llcommon) 14if (LINUX)
15 # In order to support using ld.gold on linux, we need to explicitely
16 # specify all libraries that llcommon uses.
17 # llcommon uses `clock_gettime' which is provided by librt on linux.
18 set(LLCOMMON_LIBRARIES llcommon rt)
19else (LINUX)
20 set(LLCOMMON_LIBRARIES llcommon)
21endif (LINUX)
diff --git a/linden/indra/cmake/LLMedia.cmake b/linden/indra/cmake/LLMedia.cmake
deleted file mode 100644
index 8a36a69..0000000
--- a/linden/indra/cmake/LLMedia.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
1# -*- cmake -*-
2
3include(GStreamer)
4
5set(LLMEDIA_INCLUDE_DIRS
6 ${LIBS_OPEN_DIR}/llmedia
7 )
8
9set(LLMEDIA_LIBRARIES
10 llmedia
11 ${GSTREAMER_LIBRARIES}
12 ${GSTREAMER_PLUGINS_BASE_LIBRARIES}
13 )
diff --git a/linden/indra/cmake/LLPlugin.cmake b/linden/indra/cmake/LLPlugin.cmake
new file mode 100644
index 0000000..9722f16
--- /dev/null
+++ b/linden/indra/cmake/LLPlugin.cmake
@@ -0,0 +1,8 @@
1# -*- cmake -*-
2
3
4set(LLPLUGIN_INCLUDE_DIRS
5 ${LIBS_OPEN_DIR}/llplugin
6 )
7
8set(LLPLUGIN_LIBRARIES llplugin)
diff --git a/linden/indra/cmake/MediaPluginBase.cmake b/linden/indra/cmake/MediaPluginBase.cmake
new file mode 100644
index 0000000..2be035b
--- /dev/null
+++ b/linden/indra/cmake/MediaPluginBase.cmake
@@ -0,0 +1,8 @@
1# -*- cmake -*-
2
3
4set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
5 ${LIBS_OPEN_DIR}/media_plugins/base/
6 )
7
8set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
diff --git a/linden/indra/cmake/Mozlib.cmake b/linden/indra/cmake/Mozlib.cmake
index e9555df..e69de29 100644
--- a/linden/indra/cmake/Mozlib.cmake
+++ b/linden/indra/cmake/Mozlib.cmake
@@ -1,47 +0,0 @@
1# -*- cmake -*-
2include(Linking)
3include(Prebuilt)
4
5if (STANDALONE)
6 set(MOZLIB OFF CACHE BOOL
7 "Enable Mozilla support in the viewer (requires llmozlib library).")
8else (STANDALONE)
9 use_prebuilt_binary(llmozlib)
10 set(MOZLIB ON CACHE BOOL
11 "Enable Mozilla support in the viewer (requires llmozlib library).")
12endif (STANDALONE)
13
14if (MOZLIB)
15 add_definitions(-DLL_LLMOZLIB_ENABLED=1)
16
17 if (LINUX)
18 link_directories(${CMAKE_SOURCE_DIR}/newview/app_settings/mozilla-runtime-linux-${ARCH})
19 set(MOZLIB_LIBRARIES
20 llmozlib2
21 mozjs
22 nspr4
23 plc4
24 plds4
25 xpcom
26 xul
27 profdirserviceprovider_s
28 )
29 elseif (WINDOWS)
30 if (MSVC71)
31 set(MOZLIB_LIBRARIES
32 debug llmozlib2d
33 optimized llmozlib2)
34 elseif (MSVC80 OR MSVC90)
35 set(MOZLIB_LIBRARIES
36 debug llmozlib2d-vc80
37 optimized llmozlib2-vc80)
38 endif (MSVC71)
39 else (LINUX)
40 set(MOZLIB_LIBRARIES
41 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllmozlib2.dylib
42 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libllmozlib2.dylib
43 )
44 endif (LINUX)
45else (MOZLIB)
46 add_definitions(-DLL_LLMOZLIB_ENABLED=0)
47endif (MOZLIB)
diff --git a/linden/indra/cmake/NDOF.cmake b/linden/indra/cmake/NDOF.cmake
index dad74e9..bdf5db1 100644
--- a/linden/indra/cmake/NDOF.cmake
+++ b/linden/indra/cmake/NDOF.cmake
@@ -1,14 +1,28 @@
1# -*- cmake -*- 1# -*- cmake -*-
2include(Prebuilt) 2include(Prebuilt)
3 3
4use_prebuilt_binary(ndofdev) 4if (STANDALONE)
5 include(FindNDOF)
6 if(NOT NDOF_FOUND)
7 message(STATUS "Building without N-DoF joystick support")
8 endif(NOT NDOF_FOUND)
9else (STANDALONE)
10 use_prebuilt_binary(ndofdev)
5 11
6if (WINDOWS OR DARWIN OR LINUX) 12 if (WINDOWS)
7 add_definitions(-DLIB_NDOF=1) 13 set(NDOF_LIBRARY libndofdev)
8endif (WINDOWS OR DARWIN OR LINUX) 14 elseif (DARWIN OR LINUX)
15 set(NDOF_LIBRARY ndofdev)
16 endif (WINDOWS)
17
18 set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
19 set(NDOF_FOUND 1)
20endif (STANDALONE)
9 21
10if (WINDOWS) 22if (NDOF_FOUND)
11 set(NDOF_LIBRARY libndofdev) 23 add_definitions(-DLIB_NDOF=1)
12elseif (DARWIN OR LINUX) 24 include_directories(${NDOF_INCLUDE_DIR})
13 set(NDOF_LIBRARY ndofdev) 25else (NDOF_FOUND)
14endif (WINDOWS) 26 set(NDOF_INCLUDE_DIR "")
27 set(NDOF_LIBRARY "")
28endif (NDOF_FOUND)
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
index 0ac9fb2..b9efd57 100644
--- a/linden/indra/cmake/OPENAL.cmake
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -2,11 +2,21 @@
2 2
3include(Variables) 3include(Variables)
4include(Linking) 4include(Linking)
5include(FindPkgConfig)
5 6
6set(OPENAL ON CACHE BOOL "Enable OpenAL") 7set(OPENAL ON CACHE BOOL "Enable OpenAL")
7 8
9# If STANDALONE but NOT PKG_CONFIG_FOUND we should fail,
10# but why try to find it as prebuilt?
11if (OPENAL AND STANDALONE AND PKG_CONFIG_FOUND)
8 12
9if (OPENAL) 13 # This module defines
14 # OPENAL_INCLUDE_DIRS
15 # OPENAL_LIBRARIES
16 # OPENAL_FOUND
17 pkg_check_modules(OPENAL REQUIRED freealut) # freealut links with openal.
18
19elseif (OPENAL)
10 20
11 # message(STATUS "Building with OpenAL audio support") 21 # message(STATUS "Building with OpenAL audio support")
12 22
@@ -21,11 +31,9 @@ if (OPENAL)
21 31
22 elseif (DARWIN) 32 elseif (DARWIN)
23 # Look for for system's OpenAL.framework 33 # Look for for system's OpenAL.framework
24 find_library(OPENAL_LIB 34 # Nemu: This code has never looked for the system's OpenAL.framework
25 NAMES openal.1 35 # Nemu: should it?
26 PATHS ${ARCH_PREBUILT_DIRS_RELEASE} 36 set(OPENAL_LIB ${ARCH_PREBUILT_DIRS_RELEASE}/libopenal.1.dylib)
27 NO_DEFAULT_PATH
28 )
29 else (WINDOWS) 37 else (WINDOWS)
30 set(OPENAL_LIB openal) 38 set(OPENAL_LIB openal)
31 endif (WINDOWS) 39 endif (WINDOWS)
@@ -112,4 +120,4 @@ if (OPENAL)
112 "Found OpenAL and ALUT libraries successfully" 120 "Found OpenAL and ALUT libraries successfully"
113 ) 121 )
114 122
115endif (OPENAL) 123endif (OPENAL AND STANDALONE AND PKG_CONFIG_FOUND)
diff --git a/linden/indra/cmake/PluginAPI.cmake b/linden/indra/cmake/PluginAPI.cmake
new file mode 100644
index 0000000..d1649e8
--- /dev/null
+++ b/linden/indra/cmake/PluginAPI.cmake
@@ -0,0 +1,16 @@
1# -*- cmake -*-
2
3if (WINDOWS)
4 set(PLUGIN_API_WINDOWS_LIBRARIES
5 wsock32
6 ws2_32
7 psapi
8 netapi32
9 advapi32
10 user32
11 )
12else (WINDOWS)
13 set(PLUGIN_API_WINDOWS_LIBRARIES "")
14endif (WINDOWS)
15
16
diff --git a/linden/indra/cmake/PulseAudio.cmake b/linden/indra/cmake/PulseAudio.cmake
new file mode 100644
index 0000000..f8087a8
--- /dev/null
+++ b/linden/indra/cmake/PulseAudio.cmake
@@ -0,0 +1,28 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4if (STANDALONE)
5 include(FindPkgConfig)
6
7 pkg_check_modules(PULSEAUDIO REQUIRED libpulse-mainloop-glib)
8
9elseif (LINUX)
10 use_prebuilt_binary(pulseaudio)
11 set(PULSEAUDIO_FOUND ON FORCE BOOL)
12 set(PULSEAUDIO_INCLUDE_DIRS
13 ${LIBS_PREBUILT_DIR}/include
14 )
15 # We don't need to explicitly link against pulseaudio itself, because
16 # the viewer probes for the system's copy at runtime.
17 set(PULSEAUDIO_LIBRARIES
18 # none needed!
19 )
20endif (STANDALONE)
21
22if (PULSEAUDIO_FOUND)
23 set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
24endif (PULSEAUDIO_FOUND)
25
26if (PULSEAUDIO)
27 add_definitions(-DLL_PULSEAUDIO_ENABLED=1)
28endif (PULSEAUDIO)
diff --git a/linden/indra/cmake/Python.cmake b/linden/indra/cmake/Python.cmake
index 0901c1b..e4257f4 100644
--- a/linden/indra/cmake/Python.cmake
+++ b/linden/indra/cmake/Python.cmake
@@ -9,10 +9,12 @@ if (WINDOWS)
9 NAMES python25.exe python23.exe python.exe 9 NAMES python25.exe python23.exe python.exe
10 NO_DEFAULT_PATH # added so that cmake does not find cygwin python 10 NO_DEFAULT_PATH # added so that cmake does not find cygwin python
11 PATHS 11 PATHS
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] 13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] 14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] 15 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
15 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] 16 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
17 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
16 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] 18 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
17 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] 19 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
18 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] 20 [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
diff --git a/linden/indra/cmake/QuickTimePlugin.cmake b/linden/indra/cmake/QuickTimePlugin.cmake
new file mode 100644
index 0000000..1693d0f
--- /dev/null
+++ b/linden/indra/cmake/QuickTimePlugin.cmake
@@ -0,0 +1,48 @@
1# -*- cmake -*-
2
3if(INSTALL_PROPRIETARY)
4 include(Prebuilt)
5 use_prebuilt_binary(quicktime)
6endif(INSTALL_PROPRIETARY)
7
8if (DARWIN)
9 include(CMakeFindFrameworks)
10 find_library(QUICKTIME_LIBRARY QuickTime)
11elseif (WINDOWS)
12 set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK"
13 CACHE PATH "Location of the QuickTime SDK.")
14
15 find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient
16 PATHS
17 ${ARCH_PREBUILT_DIRS_DEBUG}
18 "${QUICKTIME_SDK_DIR}\\libraries"
19 )
20
21 find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient
22 PATHS
23 ${ARCH_PREBUILT_DIRS_RELEASE}
24 "${QUICKTIME_SDK_DIR}\\libraries"
25 )
26
27 if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
28 set(QUICKTIME_LIBRARY
29 optimized ${RELEASE_QUICKTIME_LIBRARY}
30 debug ${DEBUG_QUICKTIME_LIBRARY}
31 )
32
33 endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
34
35 include_directories(
36 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime
37 "${QUICKTIME_SDK_DIR}\\CIncludes"
38 )
39endif (DARWIN)
40
41mark_as_advanced(QUICKTIME_LIBRARY)
42
43if (QUICKTIME_LIBRARY)
44 set(QUICKTIME ON CACHE BOOL "Build with QuickTime streaming media support.")
45else (QUICKTIME_LIBRARY)
46 message(STATUS "CMake cannot find the Quicktime SDK. Building without Quicktime support!")
47endif (QUICKTIME_LIBRARY)
48
diff --git a/linden/indra/cmake/Tut.cmake b/linden/indra/cmake/Tut.cmake
index 7488e9d..118c72e 100644
--- a/linden/indra/cmake/Tut.cmake
+++ b/linden/indra/cmake/Tut.cmake
@@ -1,6 +1,17 @@
1# -*- cmake -*- 1# -*- cmake -*-
2include(Prebuilt) 2include(Prebuilt)
3 3
4if (NOT STANDALONE) 4SET(TUT_FIND_REQUIRED FALSE)
5SET(TUT_FIND_QUIETLY TRUE)
6
7if (STANDALONE)
8 if (LL_TESTS)
9 SET(TUT_FIND_REQUIRED TRUE)
10 endif (LL_TESTS)
11 include(FindTut)
12 if (TUT_FOUND)
13 include_directories(${TUT_INCLUDE_DIR})
14 endif (TUT_FOUND)
15else (STANDALONE)
5 use_prebuilt_binary(tut) 16 use_prebuilt_binary(tut)
6endif(NOT STANDALONE) 17endif(STANDALONE)
diff --git a/linden/indra/cmake/UI.cmake b/linden/indra/cmake/UI.cmake
index 9d068c4..7a02dff 100644
--- a/linden/indra/cmake/UI.cmake
+++ b/linden/indra/cmake/UI.cmake
@@ -31,8 +31,9 @@ if (STANDALONE)
31 add_definitions(${${pkg}_CFLAGS_OTHERS}) 31 add_definitions(${${pkg}_CFLAGS_OTHERS})
32 endforeach(pkg) 32 endforeach(pkg)
33else (STANDALONE) 33else (STANDALONE)
34 use_prebuilt_binary(gtk-etc)
35 if (LINUX) 34 if (LINUX)
35 use_prebuilt_binary(glib) # gtk-etc needs glib
36 use_prebuilt_binary(gtk-etc)
36 set(UI_LIBRARIES 37 set(UI_LIBRARIES
37 atk-1.0 38 atk-1.0
38 cairo 39 cairo
diff --git a/linden/indra/cmake/Variables.cmake b/linden/indra/cmake/Variables.cmake
index 5d4dffe..eb9c004 100644
--- a/linden/indra/cmake/Variables.cmake
+++ b/linden/indra/cmake/Variables.cmake
@@ -45,6 +45,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
45 set(ARCH i686) 45 set(ARCH i686)
46 set(LL_ARCH ${ARCH}_win32) 46 set(LL_ARCH ${ARCH}_win32)
47 set(LL_ARCH_DIR ${ARCH}-win32) 47 set(LL_ARCH_DIR ${ARCH}-win32)
48 set(WORD_SIZE 32)
48endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") 49endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
49 50
50if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 51if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -60,17 +61,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
60 # set this dynamically from the build system now - 61 # set this dynamically from the build system now -
61 # NOTE: wont have a distributable build unless you add this on the configure line with: 62 # NOTE: wont have a distributable build unless you add this on the configure line with:
62 # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc' 63 # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'
63 #set(CMAKE_OSX_ARCHITECTURES i386;ppc) 64 set(CMAKE_OSX_ARCHITECTURES i386)
64 set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk) 65 set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
65 if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc") 66 if (CMAKE_OSX_ARCHITECTURES MATCHES "i386")
66 set(ARCH universal) 67 set(ARCH i386)
67 else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc") 68 endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386")
68 if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
69 set(ARCH ppc)
70 else (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
71 set(ARCH i386)
72 endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
73 endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
74 set(LL_ARCH ${ARCH}_darwin) 69 set(LL_ARCH ${ARCH}_darwin)
75 set(LL_ARCH_DIR universal-darwin) 70 set(LL_ARCH_DIR universal-darwin)
76endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 71endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
diff --git a/linden/indra/cmake/ViewerMiscLibs.cmake b/linden/indra/cmake/ViewerMiscLibs.cmake
index 7fe1040..38d0444 100644
--- a/linden/indra/cmake/ViewerMiscLibs.cmake
+++ b/linden/indra/cmake/ViewerMiscLibs.cmake
@@ -4,10 +4,20 @@ include(Prebuilt)
4if (NOT STANDALONE) 4if (NOT STANDALONE)
5 use_prebuilt_binary(libuuid) 5 use_prebuilt_binary(libuuid)
6 use_prebuilt_binary(vivox) 6 use_prebuilt_binary(vivox)
7 if(LINUX AND ${ARCH} STREQUAL "x86_64") 7 if(LINUX)
8 if (${ARCH} STREQUAL "x86_64")
8 use_prebuilt_binary(32bitcompatibilitylibs) 9 use_prebuilt_binary(32bitcompatibilitylibs)
9 endif(LINUX AND ${ARCH} STREQUAL "x86_64") 10 endif (${ARCH} STREQUAL "x86_64")
10 use_prebuilt_binary(fontconfig) 11 use_prebuilt_binary(fontconfig)
12 endif(LINUX)
13else (NOT STANDALONE)
14 # Download there even when using standalone.
15 set(STANDALONE OFF)
16 use_prebuilt_binary(vivox)
17 if(LINUX AND ${ARCH} STREQUAL "x86_64")
18 use_prebuilt_binary(32bitcompatibilitylibs)
19 endif(LINUX AND ${ARCH} STREQUAL "x86_64")
20 set(STANDALONE ON)
11endif(NOT STANDALONE) 21endif(NOT STANDALONE)
12 22
13if (WINDOWS) 23if (WINDOWS)
diff --git a/linden/indra/cmake/WebKitLibPlugin.cmake b/linden/indra/cmake/WebKitLibPlugin.cmake
new file mode 100644
index 0000000..a4befa4
--- /dev/null
+++ b/linden/indra/cmake/WebKitLibPlugin.cmake
@@ -0,0 +1,79 @@
1# -*- cmake -*-
2include(Linking)
3include(Prebuilt)
4
5if (STANDALONE)
6 # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny.
7 find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED)
8 include(${QT_USE_FILE})
9 set(QTDIR $ENV{QTDIR})
10 if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
11 message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
12 "Qt is found by looking for qmake in your PATH. "
13 "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
14 "or unset QTDIR if the found Qt is correct.")
15 endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
16 find_package(LLQtWebkit REQUIRED QUIET)
17 # Add the plugins.
18 set(QT_PLUGIN_LIBRARIES)
19 foreach(qlibname qgif qjpeg)
20 find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
21 if (QT_PLUGIN_${qlibname})
22 list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
23 else (QT_PLUGIN_${qtlibname})
24 message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
25 endif (QT_PLUGIN_${qlibname})
26 endforeach(qlibname)
27 # qjpeg depends on libjpeg
28 list(APPEND QT_PLUGIN_LIBRARIES jpeg)
29 set(WEBKITLIBPLUGIN OFF CACHE BOOL
30 "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
31else (STANDALONE)
32 use_prebuilt_binary(llqtwebkit)
33 set(WEBKITLIBPLUGIN ON CACHE BOOL
34 "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
35endif (STANDALONE)
36
37if (WINDOWS)
38 set(WEBKIT_PLUGIN_LIBRARIES
39 debug llqtwebkitd
40 debug QtWebKitd4
41 debug QtOpenGLd4
42 debug QtNetworkd4
43 debug QtGuid4
44 debug QtCored4
45 debug qtmaind
46 optimized llqtwebkit
47 optimized QtWebKit4
48 optimized QtOpenGL4
49 optimized QtNetwork4
50 optimized QtGui4
51 optimized QtCore4
52 optimized qtmain
53 )
54elseif (DARWIN)
55 set(WEBKIT_PLUGIN_LIBRARIES
56 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
57 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libllqtwebkit.dylib
58 )
59elseif (LINUX)
60 if (STANDALONE)
61 set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
62 else (STANDALONE)
63 set(WEBKIT_PLUGIN_LIBRARIES
64 llqtwebkit
65 qgif
66 qjpeg
67 QtWebKit
68 QtOpenGL
69 QtNetwork
70 QtGui
71 QtCore
72 jpeg
73 fontconfig
74 X11
75 Xrender
76 GL
77 )
78 endif (STANDALONE)
79endif (WINDOWS)
diff --git a/linden/indra/cmake/cmake_dummy.cpp b/linden/indra/cmake/cmake_dummy.cpp
new file mode 100644
index 0000000..25191e2
--- /dev/null
+++ b/linden/indra/cmake/cmake_dummy.cpp
@@ -0,0 +1,30 @@
1/**
2 * @file cmake_dummy.cpp
3 *
4 * $LicenseInfo:firstyear=2008&license=viewergpl$
5 *
6 * Copyright (c) 2008-2009, Linden Research, Inc.
7 *
8 * Second Life Viewer Source Code
9 * The source code in this file ("Source Code") is provided by Linden Lab
10 * to you under the terms of the GNU General Public License, version 2.0
11 * ("GPL"), unless you have obtained a separate licensing agreement
12 * ("Other License"), formally executed by you and Linden Lab. Terms of
13 * the GPL can be found in doc/GPL-license.txt in this distribution, or
14 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
15 *
16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */