PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 334 lines | 305 code | 17 blank | 12 comment | 6 complexity | 5b49fb96931fa4717b39a26e4a4ba8b8 MD5 | raw file
  1
  2# -*- cmake -*-
  3
  4project(llcommon)
  5
  6include(00-Common)
  7include(LLCommon)
  8include(Linking)
  9include(Boost)
 10include(LLSharedLibs)
 11include(GoogleBreakpad)
 12include(GooglePerfTools)
 13include(Copy3rdPartyLibs)
 14include(ZLIB)
 15
 16include_directories(
 17    ${EXPAT_INCLUDE_DIRS}
 18    ${LLCOMMON_INCLUDE_DIRS}
 19    ${ZLIB_INCLUDE_DIRS}
 20    )
 21
 22# add_executable(lltreeiterators lltreeiterators.cpp)
 23# 
 24# target_link_libraries(lltreeiterators
 25#     ${LLCOMMON_LIBRARIES})
 26
 27set(llcommon_SOURCE_FILES
 28    imageids.cpp
 29    indra_constants.cpp
 30    llallocator.cpp
 31    llallocator_heap_profile.cpp
 32    llapp.cpp
 33    llapr.cpp
 34    llassettype.cpp
 35    llavatarname.cpp
 36    llbase32.cpp
 37    llbase64.cpp
 38    llcommon.cpp
 39    llcommonutils.cpp
 40    llcoros.cpp
 41    llcrc.cpp
 42    llcriticaldamp.cpp
 43    llcursortypes.cpp
 44    lldate.cpp
 45    lldependencies.cpp
 46    lldictionary.cpp
 47    llerror.cpp
 48    llerrorthread.cpp
 49    llevent.cpp
 50    lleventapi.cpp
 51    lleventcoro.cpp
 52    lleventdispatcher.cpp
 53    lleventfilter.cpp
 54    llevents.cpp
 55    lleventtimer.cpp
 56    llfasttimer_class.cpp
 57    llfile.cpp
 58    llfindlocale.cpp
 59    llfixedbuffer.cpp
 60    llfoldertype.cpp
 61    llformat.cpp
 62    llframetimer.cpp
 63    llheartbeat.cpp
 64    llinstancetracker.cpp
 65    llliveappconfig.cpp
 66    lllivefile.cpp
 67    lllog.cpp
 68    llmd5.cpp
 69    llmemory.cpp
 70    llmemorystream.cpp
 71    llmemtype.cpp
 72    llmetrics.cpp
 73    llmetricperformancetester.cpp
 74    llmortician.cpp
 75    lloptioninterface.cpp
 76    llptrto.cpp 
 77    llprocesslauncher.cpp
 78    llprocessor.cpp
 79    llqueuedthread.cpp
 80    llrand.cpp
 81    llrefcount.cpp
 82    llrun.cpp
 83    llsd.cpp
 84    llsdserialize.cpp
 85    llsdserialize_xml.cpp
 86    llsdutil.cpp
 87    llsecondlifeurls.cpp
 88    llsingleton.cpp
 89    llstat.cpp
 90    llstacktrace.cpp
 91    llstreamtools.cpp
 92    llstring.cpp
 93    llstringtable.cpp
 94    llsys.cpp
 95    llthread.cpp
 96    llthreadsafequeue.cpp
 97    lltimer.cpp
 98    lluri.cpp
 99    lluuid.cpp
100    llworkerthread.cpp
101    metaclass.cpp
102    metaproperty.cpp
103    reflective.cpp
104    timing.cpp
105    u64.cpp
106    )
107    
108set(llcommon_HEADER_FILES
109    CMakeLists.txt
110
111    bitpack.h
112    ctype_workaround.h
113    doublelinkedlist.h
114    imageids.h
115    indra_constants.h
116    linden_common.h
117    linked_lists.h
118    llaccountingcost.h
119    llallocator.h
120    llallocator_heap_profile.h
121    llagentconstants.h
122    llavatarname.h
123    llapp.h
124    llapr.h
125    llassettype.h
126    llassoclist.h
127    llavatarconstants.h
128    llbase32.h
129    llbase64.h
130    llboost.h
131    llchat.h
132    llclickaction.h
133    llcommon.h
134    llcommonutils.h
135    llcoros.h
136    llcrc.h
137    llcriticaldamp.h
138    llcursortypes.h
139    lldarray.h
140    lldarrayptr.h
141    lldate.h
142    lldefs.h
143    lldependencies.h
144    lldeleteutils.h
145    lldepthstack.h
146    lldictionary.h
147    lldlinked.h
148    lldoubledispatch.h
149    lldqueueptr.h
150    llendianswizzle.h
151    llenum.h
152    llerror.h
153    llerrorcontrol.h
154    llerrorlegacy.h
155    llerrorthread.h
156    llevent.h
157    lleventapi.h
158    lleventcoro.h
159    lleventdispatcher.h
160    lleventfilter.h
161    llevents.h
162    lleventemitter.h
163    llextendedstatus.h
164    llfasttimer.h
165    llfasttimer_class.h
166    llfile.h
167    llfindlocale.h
168    llfixedbuffer.h
169    llfoldertype.h
170    llformat.h
171    llframetimer.h
172    llhash.h
173    llheartbeat.h
174    llhttpstatuscodes.h
175    llindexedqueue.h
176    llinstancetracker.h
177    llkeythrottle.h
178    lllazy.h
179    lllistenerwrapper.h
180    lllinkedqueue.h
181    llliveappconfig.h
182    lllivefile.h
183    lllocalidhashmap.h
184    lllog.h
185    lllslconstants.h
186    llmap.h
187    llmd5.h
188    llmemory.h
189    llmemorystream.h
190    llmemtype.h
191    llmetrics.h
192    llmetricperformancetester.h
193    llmortician.h
194    llnametable.h
195    lloptioninterface.h
196    llpointer.h
197    llpreprocessor.h
198    llpriqueuemap.h
199    llprocesslauncher.h
200    llprocessor.h
201    llptrskiplist.h
202    llptrskipmap.h
203    llptrto.h
204    llqueuedthread.h
205    llrand.h
206    llrefcount.h
207    llrun.h
208    llrefcount.h
209    llsafehandle.h
210    llsd.h
211    llsdserialize.h
212    llsdserialize_xml.h
213    llsdutil.h
214    llsecondlifeurls.h
215    llsimplehash.h
216    llsingleton.h
217    llskiplist.h
218    llskipmap.h
219    llstack.h
220    llstacktrace.h
221    llstat.h
222    llstatenums.h
223    llstl.h
224    llstreamtools.h
225    llstrider.h
226    llstring.h
227    llstringtable.h
228    llsys.h
229    llthread.h
230    llthreadsafequeue.h
231    lltimer.h
232    lltreeiterators.h
233    lluri.h
234    lluuid.h
235    lluuidhashmap.h
236    llversionserver.h
237    llversionviewer.h
238    llworkerthread.h
239    ll_template_cast.h
240    metaclass.h
241    metaclasst.h
242    metaproperty.h
243    metapropertyt.h
244    reflective.h
245    reflectivet.h
246    roles_constants.h
247    stdenums.h
248    stdtypes.h
249    string_table.h
250    stringize.h
251    timer.h
252    timing.h
253    u64.h
254    )
255
256set_source_files_properties(${llcommon_HEADER_FILES}
257                            PROPERTIES HEADER_FILE_ONLY TRUE)
258
259list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
260
261if(LLCOMMON_LINK_SHARED)
262  add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
263  if(NOT WORD_SIZE EQUAL 32)
264    if(WINDOWS)
265      add_definitions(/FIXED:NO)
266    else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
267      add_definitions(-fPIC)
268    endif(WINDOWS)
269  endif(NOT WORD_SIZE EQUAL 32)
270  if(WINDOWS)
271    # always generate llcommon.pdb, even for "Release" builds
272    set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG")
273  endif(WINDOWS)
274  ll_stage_sharedlib(llcommon)
275else(LLCOMMON_LINK_SHARED)
276    add_library (llcommon ${llcommon_SOURCE_FILES})
277endif(LLCOMMON_LINK_SHARED)
278
279target_link_libraries(
280    llcommon
281    ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
282    ${APRUTIL_LIBRARIES}
283    ${APR_LIBRARIES}
284    ${EXPAT_LIBRARIES}
285    ${ZLIB_LIBRARIES}
286    ${WINDOWS_LIBRARIES}
287    ${BOOST_PROGRAM_OPTIONS_LIBRARY}
288    ${BOOST_REGEX_LIBRARY}
289    ${GOOGLE_PERFTOOLS_LIBRARIES}
290    )
291
292if (DARWIN)
293  include(CMakeFindFrameworks)
294  find_library(CARBON_LIBRARY Carbon)
295  target_link_libraries(llcommon ${CARBON_LIBRARY})
296endif (DARWIN)
297
298add_dependencies(llcommon stage_third_party_libs)
299
300if (LL_TESTS)
301  include(LLAddBuildTest)
302  SET(llcommon_TEST_SOURCE_FILES
303    # unit-testing llcommon is not possible right now as the test-harness *itself* depends upon llcommon, causing a circular dependency.  Add your 'unit' tests as integration tests for now.
304    )
305  LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}")
306
307  #set(TEST_DEBUG on)
308  set(test_libs llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${GOOGLEMOCK_LIBRARIES})
309  LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
310  LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}")
311  LL_ADD_INTEGRATION_TEST(llbase64 "" "${test_libs}")
312  LL_ADD_INTEGRATION_TEST(lldate "" "${test_libs}")
313  LL_ADD_INTEGRATION_TEST(lldependencies "" "${test_libs}")
314  LL_ADD_INTEGRATION_TEST(llerror "" "${test_libs}")
315  LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")
316  LL_ADD_INTEGRATION_TEST(llinstancetracker "" "${test_libs}")
317  LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}")
318  LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")
319  LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")
320  LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}"
321                          "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/tests/setpython.py")
322  LL_ADD_INTEGRATION_TEST(llsingleton "" "${test_libs}")                          
323  LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
324  LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
325  LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
326  LL_ADD_INTEGRATION_TEST(reflection "" "${test_libs}")
327  LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")
328  LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
329
330  # *TODO - reenable these once tcmalloc libs no longer break the build.
331  #ADD_BUILD_TEST(llallocator llcommon)
332  #ADD_BUILD_TEST(llallocator_heap_profile llcommon)
333  #ADD_BUILD_TEST(llmemtype llcommon)
334endif (LL_TESTS)