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.cmake20
-rw-r--r--linden/indra/cmake/APR.cmake10
-rw-r--r--linden/indra/cmake/Audio.cmake16
-rw-r--r--linden/indra/cmake/Boost.cmake12
-rw-r--r--linden/indra/cmake/FindMT.cmake15
-rw-r--r--linden/indra/cmake/GooglePerfTools.cmake5
-rw-r--r--linden/indra/cmake/JPEG.cmake2
-rw-r--r--linden/indra/cmake/LLAddBuildTest.cmake154
-rw-r--r--linden/indra/cmake/LLAudio.cmake9
-rw-r--r--linden/indra/cmake/LLRender.cmake4
-rw-r--r--linden/indra/cmake/LLWindow.cmake5
-rw-r--r--linden/indra/cmake/Linking.cmake5
-rw-r--r--linden/indra/cmake/RunBuildTest.cmake22
-rw-r--r--linden/indra/cmake/Tut.cmake (renamed from linden/indra/cmake/CommonMiscLibs.cmake)1
-rw-r--r--linden/indra/cmake/ViewerMiscLibs.cmake1
-rw-r--r--linden/indra/cmake/ZLIB.cmake6
16 files changed, 249 insertions, 38 deletions
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake
index 27838d6..e867df8 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 -DNDEBUG") 12 "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG")
13set(CMAKE_CXX_FLAGS_RELWITHDEBINFO 13set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
14 "-DLL_RELEASE=1 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") 14 "-DLL_RELEASE=1 -D_SECURE_SCL=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.
@@ -26,15 +26,18 @@ if (WINDOWS)
26 # Don't build DLLs. 26 # Don't build DLLs.
27 set(BUILD_SHARED_LIBS OFF) 27 set(BUILD_SHARED_LIBS OFF)
28 28
29 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MTd" 29 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd"
30 CACHE STRING "C++ compiler debug options" FORCE) 30 CACHE STRING "C++ compiler debug options" FORCE)
31 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO 31 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
32 "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MT" 32 "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD"
33 CACHE STRING "C++ compiler release-with-debug options" FORCE) 33 CACHE STRING "C++ compiler release-with-debug options" FORCE)
34 set(CMAKE_CXX_FLAGS_RELEASE 34 set(CMAKE_CXX_FLAGS_RELEASE
35 "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MT" 35 "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD"
36 CACHE STRING "C++ compiler release options" FORCE) 36 CACHE STRING "C++ compiler release options" FORCE)
37 37
38 set(CMAKE_CXX_STANDARD_LIBRARIES "")
39 set(CMAKE_C_STANDARD_LIBRARIES "")
40
38 add_definitions( 41 add_definitions(
39 /DLL_WINDOWS=1 42 /DLL_WINDOWS=1
40 /DUNICODE 43 /DUNICODE
@@ -126,7 +129,8 @@ if (LINUX)
126 # widespread of them. 129 # widespread of them.
127 130
128 if (${CXX_VERSION} MATCHES "4.3") 131 if (${CXX_VERSION} MATCHES "4.3")
129 add_definitions(-Wno-deprecated -Wno-parentheses) 132 add_definitions(-Wno-parentheses)
133 set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}")
130 endif (${CXX_VERSION} MATCHES "4.3") 134 endif (${CXX_VERSION} MATCHES "4.3")
131 135
132 # End of hacks. 136 # End of hacks.
@@ -167,6 +171,8 @@ if (LINUX)
167 if (VIEWER) 171 if (VIEWER)
168 add_definitions(-DAPPID=imprudence) 172 add_definitions(-DAPPID=imprudence)
169 add_definitions(-fvisibility=hidden) 173 add_definitions(-fvisibility=hidden)
174 # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
175 add_definitions(-DLL_IGNORE_SIGCHLD)
170 if (NOT STANDALONE) 176 if (NOT STANDALONE)
171 # this stops us requiring a really recent glibc at runtime 177 # this stops us requiring a really recent glibc at runtime
172 add_definitions(-fno-stack-protector) 178 add_definitions(-fno-stack-protector)
@@ -192,7 +198,7 @@ endif (DARWIN)
192 198
193 199
194if (LINUX OR DARWIN) 200if (LINUX OR DARWIN)
195 set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") 201 set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-non-virtual-dtor")
196 202
197 if (NOT GCC_DISABLE_FATAL_WARNINGS) 203 if (NOT GCC_DISABLE_FATAL_WARNINGS)
198 set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") 204 set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake
index 088b3e6..e9f6411 100644
--- a/linden/indra/cmake/APR.cmake
+++ b/linden/indra/cmake/APR.cmake
@@ -1,5 +1,3 @@
1# -*- cmake -*-
2
3include(BerkeleyDB) 1include(BerkeleyDB)
4include(Linking) 2include(Linking)
5include(Prebuilt) 3include(Prebuilt)
@@ -19,16 +17,16 @@ else (STANDALONE)
19 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib 17 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
20 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib 18 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
21 ) 19 )
22 set(APRUTIL_LIBRARIES
23 debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib
24 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib
25 )
26 set(APRICONV_LIBRARIES 20 set(APRICONV_LIBRARIES
27 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib 21 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apriconv-1.lib
28 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib 22 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apriconv-1.lib
29 ) 23 )
30 # Doesn't need to link with iconv.dll 24 # Doesn't need to link with iconv.dll
31 set(APRICONV_LIBRARIES "") 25 set(APRICONV_LIBRARIES "")
26 set(APRUTIL_LIBRARIES
27 debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib ${APRICONV_LIBRARIES}
28 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib ${APRICONV_LIBRARIES}
29 )
32 elseif (DARWIN) 30 elseif (DARWIN)
33 set(APR_LIBRARIES 31 set(APR_LIBRARIES
34 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a 32 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a
diff --git a/linden/indra/cmake/Audio.cmake b/linden/indra/cmake/Audio.cmake
index c6ccab2..d23bc2f 100644
--- a/linden/indra/cmake/Audio.cmake
+++ b/linden/indra/cmake/Audio.cmake
@@ -14,10 +14,18 @@ else (STANDALONE)
14 set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) 14 set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
15 15
16 if (WINDOWS) 16 if (WINDOWS)
17 set(OGG_LIBRARIES ogg_static_mt) 17 set(OGG_LIBRARIES
18 set(VORBIS_LIBRARIES vorbis_static_mt) 18 optimized ogg_static
19 set(VORBISENC_LIBRARIES vorbisenc_static_mt) 19 debug ogg_static_d)
20 set(VORBISFILE_LIBRARIES vorbisfile_static_mt) 20 set(VORBIS_LIBRARIES
21 optimized vorbis_static
22 debug vorbis_static_d)
23 set(VORBISENC_LIBRARIES
24 optimized vorbisenc_static
25 debug vorbisenc_static_d)
26 set(VORBISFILE_LIBRARIES
27 optimized vorbisfile_static
28 debug vorbisfile_static_d)
21 else (WINDOWS) 29 else (WINDOWS)
22 set(OGG_LIBRARIES ogg) 30 set(OGG_LIBRARIES ogg)
23 set(VORBIS_LIBRARIES vorbis) 31 set(VORBIS_LIBRARIES vorbis)
diff --git a/linden/indra/cmake/Boost.cmake b/linden/indra/cmake/Boost.cmake
index a7db67c..0578ae9 100644
--- a/linden/indra/cmake/Boost.cmake
+++ b/linden/indra/cmake/Boost.cmake
@@ -28,14 +28,14 @@ else (STANDALONE)
28 debug libboost_signals-vc71-mt-sgd-${BOOST_VERSION}) 28 debug libboost_signals-vc71-mt-sgd-${BOOST_VERSION})
29 else (MSVC71) 29 else (MSVC71)
30 set(BOOST_PROGRAM_OPTIONS_LIBRARY 30 set(BOOST_PROGRAM_OPTIONS_LIBRARY
31 optimized libboost_program_options-vc80-mt-s-${BOOST_VERSION} 31 optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
32 debug libboost_program_options-vc80-mt-sgd-${BOOST_VERSION}) 32 debug libboost_program_options-vc80-mt-gd-${BOOST_VERSION})
33 set(BOOST_REGEX_LIBRARY 33 set(BOOST_REGEX_LIBRARY
34 optimized libboost_regex-vc80-mt-s-${BOOST_VERSION} 34 optimized libboost_regex-vc80-mt-${BOOST_VERSION}
35 debug libboost_regex-vc80-mt-sgd-${BOOST_VERSION}) 35 debug libboost_regex-vc80-mt-gd-${BOOST_VERSION})
36 set(BOOST_SIGNALS_LIBRARY 36 set(BOOST_SIGNALS_LIBRARY
37 optimized libboost_signals-vc80-mt-s-${BOOST_VERSION} 37 optimized libboost_signals-vc80-mt-${BOOST_VERSION}
38 debug libboost_signals-vc80-mt-sgd-${BOOST_VERSION}) 38 debug libboost_signals-vc80-mt-gd-${BOOST_VERSION})
39 endif (MSVC71) 39 endif (MSVC71)
40 elseif (DARWIN) 40 elseif (DARWIN)
41 set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt) 41 set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
diff --git a/linden/indra/cmake/FindMT.cmake b/linden/indra/cmake/FindMT.cmake
new file mode 100644
index 0000000..5239a4c
--- /dev/null
+++ b/linden/indra/cmake/FindMT.cmake
@@ -0,0 +1,15 @@
1#Find the windows manifest tool.
2
3FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
4 PATHS
5 "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
6 "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
7 "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
8IF(HAVE_MANIFEST_TOOL)
9 MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
10ELSE(HAVE_MANIFEST_TOOL)
11 MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
12ENDIF(HAVE_MANIFEST_TOOL)
13
14STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
15 ${CMAKE_EXE_LINKER_FLAGS})
diff --git a/linden/indra/cmake/GooglePerfTools.cmake b/linden/indra/cmake/GooglePerfTools.cmake
index 25e9f6d..aff65cb 100644
--- a/linden/indra/cmake/GooglePerfTools.cmake
+++ b/linden/indra/cmake/GooglePerfTools.cmake
@@ -5,6 +5,11 @@ if (STANDALONE)
5 include(FindGooglePerfTools) 5 include(FindGooglePerfTools)
6else (STANDALONE) 6else (STANDALONE)
7 use_prebuilt_binary(google) 7 use_prebuilt_binary(google)
8 if (WINDOWS)
9 set(TCMALLOC_LIBRARIES
10 debug libtcmalloc_minimal-debug
11 optimized libtcmalloc_minimal-debug)
12 endif (WINDOWS)
8 if (LINUX) 13 if (LINUX)
9 set(TCMALLOC_LIBRARIES tcmalloc) 14 set(TCMALLOC_LIBRARIES tcmalloc)
10 set(STACKTRACE_LIBRARIES stacktrace) 15 set(STACKTRACE_LIBRARIES stacktrace)
diff --git a/linden/indra/cmake/JPEG.cmake b/linden/indra/cmake/JPEG.cmake
index 5d0ee0d..9514d59 100644
--- a/linden/indra/cmake/JPEG.cmake
+++ b/linden/indra/cmake/JPEG.cmake
@@ -17,7 +17,7 @@ else (STANDALONE)
17 debug ${ARCH_PREBUILT_DIRS_DEBUG}/liblljpeg.a 17 debug ${ARCH_PREBUILT_DIRS_DEBUG}/liblljpeg.a
18 ) 18 )
19 elseif (WINDOWS) 19 elseif (WINDOWS)
20 set(JPEG_LIBRARIES jpeglib_6b) 20 set(JPEG_LIBRARIES jpeglib)
21 endif (LINUX) 21 endif (LINUX)
22 set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) 22 set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
23endif (STANDALONE) 23endif (STANDALONE)
diff --git a/linden/indra/cmake/LLAddBuildTest.cmake b/linden/indra/cmake/LLAddBuildTest.cmake
new file mode 100644
index 0000000..08151bc
--- /dev/null
+++ b/linden/indra/cmake/LLAddBuildTest.cmake
@@ -0,0 +1,154 @@
1# -*- cmake -*-
2
3INCLUDE(APR)
4INCLUDE(LLMath)
5
6MACRO(ADD_BUILD_TEST_NO_COMMON name parent)
7# MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
8 IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
9 SET(no_common_libraries
10 ${APRUTIL_LIBRARIES}
11 ${APR_LIBRARIES}
12 ${PTHREAD_LIBRARY}
13 ${WINDOWS_LIBRARIES}
14 )
15 SET(no_common_source_files
16 ${name}.cpp
17 tests/${name}_test.cpp
18 ${CMAKE_SOURCE_DIR}/test/test.cpp
19 )
20 ADD_BUILD_TEST_INTERNAL("${name}" "${parent}" "${no_common_libraries}" "${no_common_source_files}")
21 ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
22ENDMACRO(ADD_BUILD_TEST_NO_COMMON name parent)
23
24
25MACRO(ADD_BUILD_TEST name parent)
26 # optional extra parameter: list of additional source files
27 SET(more_source_files "${ARGN}")
28
29# MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
30 IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
31
32 SET(basic_libraries
33 ${LLCOMMON_LIBRARIES}
34 ${APRUTIL_LIBRARIES}
35 ${APR_LIBRARIES}
36 ${PTHREAD_LIBRARY}
37 ${WINDOWS_LIBRARIES}
38 )
39 SET(basic_source_files
40 ${name}.cpp
41 tests/${name}_test.cpp
42 ${CMAKE_SOURCE_DIR}/test/test.cpp
43 ${CMAKE_SOURCE_DIR}/test/lltut.cpp
44 ${more_source_files}
45 )
46 ADD_BUILD_TEST_INTERNAL("${name}" "${parent}" "${basic_libraries}" "${basic_source_files}")
47
48 ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
49ENDMACRO(ADD_BUILD_TEST name parent)
50
51
52MACRO(ADD_VIEWER_BUILD_TEST name parent)
53 # This is just like the generic ADD_BUILD_TEST, but we implicitly
54 # add the necessary precompiled header .cpp file (anyone else find that
55 # oxymoronic?) because the MSVC build errors will NOT point you there.
56 ADD_BUILD_TEST("${name}" "${parent}" llviewerprecompiledheaders.cpp)
57ENDMACRO(ADD_VIEWER_BUILD_TEST name parent)
58
59
60MACRO(ADD_SIMULATOR_BUILD_TEST name parent)
61 ADD_BUILD_TEST("${name}" "${parent}" llsimprecompiledheaders.cpp)
62
63 if (WINDOWS)
64 SET_SOURCE_FILES_PROPERTIES(
65 "tests/${name}_test.cpp"
66 PROPERTIES
67 COMPILE_FLAGS "/Yullsimprecompiledheaders.h"
68 )
69 endif (WINDOWS)
70ENDMACRO(ADD_SIMULATOR_BUILD_TEST name parent)
71
72MACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
73 # Optional additional parameter: pathname of Python wrapper script
74 SET(wrapper "${ARGN}")
75 #MESSAGE(STATUS "ADD_BUILD_TEST_INTERNAL ${name} wrapper = ${wrapper}")
76
77 SET(TEST_SOURCE_FILES ${source_files})
78 SET(HEADER "${name}.h")
79 set_source_files_properties(${HEADER}
80 PROPERTIES HEADER_FILE_ONLY TRUE)
81 LIST(APPEND TEST_SOURCE_FILES ${HEADER})
82 INCLUDE_DIRECTORIES("${LIBS_OPEN_DIR}/test")
83 ADD_EXECUTABLE(${name}_test ${TEST_SOURCE_FILES})
84 TARGET_LINK_LIBRARIES(${name}_test
85 ${libraries}
86 )
87
88 GET_TARGET_PROPERTY(TEST_EXE ${name}_test LOCATION)
89 SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}_test_ok.txt)
90
91 IF ("${wrapper}" STREQUAL "")
92 SET(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
93 ELSE ("${wrapper}" STREQUAL "")
94 SET(TEST_CMD ${PYTHON_EXECUTABLE} ${wrapper} ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
95 ENDIF ("${wrapper}" STREQUAL "")
96
97 #MESSAGE(STATUS "ADD_BUILD_TEST_INTERNAL ${name} test_cmd = ${TEST_CMD}")
98 SET(TEST_SCRIPT_CMD
99 ${CMAKE_COMMAND}
100 -DLD_LIBRARY_PATH=${ARCH_PREBUILT_DIRS}:/usr/lib
101 -DTEST_CMD:STRING="${TEST_CMD}"
102 -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
103 )
104
105 #MESSAGE(STATUS "ADD_BUILD_TEST_INTERNAL ${name} test_script = ${TEST_SCRIPT_CMD}")
106 ADD_CUSTOM_COMMAND(
107 OUTPUT ${TEST_OUTPUT}
108 COMMAND ${TEST_SCRIPT_CMD}
109 DEPENDS ${name}_test
110 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
111 )
112
113 ADD_CUSTOM_TARGET(${name}_test_ok ALL DEPENDS ${TEST_OUTPUT})
114 IF (${parent})
115 ADD_DEPENDENCIES(${parent} ${name}_test_ok)
116 ENDIF (${parent})
117
118ENDMACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
119
120
121MACRO(ADD_COMM_BUILD_TEST name parent wrapper)
122## MESSAGE(STATUS "ADD_COMM_BUILD_TEST ${name} wrapper = ${wrapper}")
123 # optional extra parameter: list of additional source files
124 SET(more_source_files "${ARGN}")
125## MESSAGE(STATUS "ADD_COMM_BUILD_TEST ${name} more_source_files = ${more_source_files}")
126
127 SET(libraries
128 ${LLMESSAGE_LIBRARIES}
129 ${LLMATH_LIBRARIES}
130 ${LLVFS_LIBRARIES}
131 ${LLCOMMON_LIBRARIES}
132 ${APRUTIL_LIBRARIES}
133 ${APR_LIBRARIES}
134 ${PTHREAD_LIBRARY}
135 ${WINDOWS_LIBRARIES}
136 )
137 SET(source_files
138 ${name}.cpp
139 tests/${name}_test.cpp
140 ${CMAKE_SOURCE_DIR}/test/test.cpp
141 ${CMAKE_SOURCE_DIR}/test/lltut.cpp
142 ${more_source_files}
143 )
144
145 ADD_BUILD_TEST_INTERNAL("${name}" "${parent}" "${libraries}" "${source_files}" "${wrapper}")
146ENDMACRO(ADD_COMM_BUILD_TEST name parent wrapper)
147
148MACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
149 # This is just like the generic ADD_COMM_BUILD_TEST, but we implicitly
150 # add the necessary precompiled header .cpp file (anyone else find that
151 # oxymoronic?) because the MSVC build errors will NOT point you there.
152## MESSAGE(STATUS "ADD_VIEWER_COMM_BUILD_TEST ${name} wrapper = ${wrapper}")
153 ADD_COMM_BUILD_TEST("${name}" "${parent}" "${wrapper}" llviewerprecompiledheaders.cpp)
154ENDMACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake
index dcfd269..625e212 100644
--- a/linden/indra/cmake/LLAudio.cmake
+++ b/linden/indra/cmake/LLAudio.cmake
@@ -8,11 +8,4 @@ set(LLAUDIO_INCLUDE_DIRS
8 ${OPENAL_INCLUDE_DIRS} 8 ${OPENAL_INCLUDE_DIRS}
9 ) 9 )
10 10
11set(LLAUDIO_LIBRARIES 11set(LLAUDIO_LIBRARIES llaudio ${OPENAL_LIBRARIES})
12 llaudio
13 ${VORBISENC_LIBRARIES}
14 ${VORBISFILE_LIBRARIES}
15 ${VORBIS_LIBRARIES}
16 ${OGG_LIBRARIES}
17 ${OPENAL_LIBRARIES}
18 )
diff --git a/linden/indra/cmake/LLRender.cmake b/linden/indra/cmake/LLRender.cmake
index bbcf4cd..c47e887 100644
--- a/linden/indra/cmake/LLRender.cmake
+++ b/linden/indra/cmake/LLRender.cmake
@@ -18,8 +18,8 @@ endif (SERVER AND LINUX)
18 18
19# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set 19# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set
20# differently for different object files. 20# differently for different object files.
21macro (copy_server_sources _copied_SOURCES) 21macro (copy_server_sources )
22 foreach (PREFIX ${_copied_SOURCES}) 22 foreach (PREFIX ${ARGV})
23 add_custom_command( 23 add_custom_command(
24 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp 24 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
25 COMMAND ${CMAKE_COMMAND} 25 COMMAND ${CMAKE_COMMAND}
diff --git a/linden/indra/cmake/LLWindow.cmake b/linden/indra/cmake/LLWindow.cmake
index c0efa27..e749055 100644
--- a/linden/indra/cmake/LLWindow.cmake
+++ b/linden/indra/cmake/LLWindow.cmake
@@ -40,4 +40,9 @@ else (SERVER AND LINUX)
40 set(LLWINDOW_LIBRARIES 40 set(LLWINDOW_LIBRARIES
41 llwindow 41 llwindow
42 ) 42 )
43 if (WINDOWS)
44 list(APPEND LLWINDOW_LIBRARIES
45 comdlg32
46 )
47 endif (WINDOWS)
43endif (SERVER AND LINUX) 48endif (SERVER AND LINUX)
diff --git a/linden/indra/cmake/Linking.cmake b/linden/indra/cmake/Linking.cmake
index 167c5dd..2bddb95 100644
--- a/linden/indra/cmake/Linking.cmake
+++ b/linden/indra/cmake/Linking.cmake
@@ -32,11 +32,16 @@ endif (LINUX)
32 32
33if (WINDOWS) 33if (WINDOWS)
34 set(WINDOWS_LIBRARIES 34 set(WINDOWS_LIBRARIES
35 advapi32
36 shell32
35 ws2_32 37 ws2_32
36 mswsock 38 mswsock
37 psapi 39 psapi
38 winmm 40 winmm
39 netapi32 41 netapi32
42 wldap32
43 gdi32
44 user32
40 ) 45 )
41else (WINDOWS) 46else (WINDOWS)
42 set(WINDOWS_LIBRARIES "") 47 set(WINDOWS_LIBRARIES "")
diff --git a/linden/indra/cmake/RunBuildTest.cmake b/linden/indra/cmake/RunBuildTest.cmake
new file mode 100644
index 0000000..2da3e88
--- /dev/null
+++ b/linden/indra/cmake/RunBuildTest.cmake
@@ -0,0 +1,22 @@
1#This cmake script is meant to be run as a build time custom command.
2#The script is run using cmake w/ the -P option.
3# parameters are passed to this scripts execution with the -D option.
4# A full command line would look like this:
5# cmake -D LD_LIBRARY_PATH=~/checkout/libraries -D TEST_CMD=./llunit_test -D ARGS=--touch=llunit_test_ok.txt -P RunBuildTest.cmake
6
7# Parameters:
8# LD_LIBRARY_PATH: string, What to set the LD_LIBRARY_PATH env var.
9# TEST_CMD: string list, command to run the unit test with, followed by its args.
10set(ENV{LD_LIBRARY_PATH} ${LD_LIBRARY_PATH})
11#message("Running: ${TEST_CMD}")
12separate_arguments(TEST_CMD)
13#message("Running: ${TEST_CMD}")
14execute_process(
15 COMMAND ${TEST_CMD}
16 RESULT_VARIABLE RES
17 )
18
19if(NOT ${RES} STREQUAL 0)
20 message(STATUS "Failure running: ${TEST_CMD}")
21 message(FATAL_ERROR "Error: ${RES}")
22endif(NOT ${RES} STREQUAL 0) \ No newline at end of file
diff --git a/linden/indra/cmake/CommonMiscLibs.cmake b/linden/indra/cmake/Tut.cmake
index 513acf3..7488e9d 100644
--- a/linden/indra/cmake/CommonMiscLibs.cmake
+++ b/linden/indra/cmake/Tut.cmake
@@ -4,4 +4,3 @@ include(Prebuilt)
4if (NOT STANDALONE) 4if (NOT STANDALONE)
5 use_prebuilt_binary(tut) 5 use_prebuilt_binary(tut)
6endif(NOT STANDALONE) 6endif(NOT STANDALONE)
7
diff --git a/linden/indra/cmake/ViewerMiscLibs.cmake b/linden/indra/cmake/ViewerMiscLibs.cmake
index 68ee881..2a8abda 100644
--- a/linden/indra/cmake/ViewerMiscLibs.cmake
+++ b/linden/indra/cmake/ViewerMiscLibs.cmake
@@ -2,7 +2,6 @@
2include(Prebuilt) 2include(Prebuilt)
3 3
4if (NOT STANDALONE) 4if (NOT STANDALONE)
5 use_prebuilt_binary(libstdc++)
6 use_prebuilt_binary(libuuid) 5 use_prebuilt_binary(libuuid)
7 use_prebuilt_binary(vivox) 6 use_prebuilt_binary(vivox)
8 use_prebuilt_binary(fontconfig) 7 use_prebuilt_binary(fontconfig)
diff --git a/linden/indra/cmake/ZLIB.cmake b/linden/indra/cmake/ZLIB.cmake
index 80d4191..48e5130 100644
--- a/linden/indra/cmake/ZLIB.cmake
+++ b/linden/indra/cmake/ZLIB.cmake
@@ -10,11 +10,13 @@ if (STANDALONE)
10else (STANDALONE) 10else (STANDALONE)
11 use_prebuilt_binary(zlib) 11 use_prebuilt_binary(zlib)
12 if (WINDOWS) 12 if (WINDOWS)
13 set(ZLIB_LIBRARIES zlib) 13 set(ZLIB_LIBRARIES
14 debug zlibd
15 optimized zlib)
14 else (WINDOWS) 16 else (WINDOWS)
15 set(ZLIB_LIBRARIES z) 17 set(ZLIB_LIBRARIES z)
16 endif (WINDOWS) 18 endif (WINDOWS)
17 if (WINDOWS OR LINUX) 19 if (WINDOWS OR LINUX)
18 set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/zlib) 20 set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib)
19 endif (WINDOWS OR LINUX) 21 endif (WINDOWS OR LINUX)
20endif (STANDALONE) 22endif (STANDALONE)