PageRenderTime 33ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llvfs/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 100 lines | 74 code | 21 blank | 5 comment | 6 complexity | 7874792a9378a863e29c4bcc05556316 MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. project(llvfs)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(UnixInstall)
  6. include_directories(
  7. ${LLCOMMON_INCLUDE_DIRS}
  8. )
  9. set(llvfs_SOURCE_FILES
  10. lldir.cpp
  11. lldiriterator.cpp
  12. lllfsthread.cpp
  13. llpidlock.cpp
  14. llvfile.cpp
  15. llvfs.cpp
  16. llvfsthread.cpp
  17. )
  18. set(llvfs_HEADER_FILES
  19. CMakeLists.txt
  20. lldir.h
  21. lldirguard.h
  22. lldiriterator.h
  23. lllfsthread.h
  24. llpidlock.h
  25. llvfile.h
  26. llvfs.h
  27. llvfsthread.h
  28. )
  29. if (DARWIN)
  30. LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp)
  31. LIST(APPEND llvfs_HEADER_FILES lldir_mac.h)
  32. endif (DARWIN)
  33. if (LINUX)
  34. LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
  35. LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
  36. if (VIEWER AND INSTALL)
  37. set_source_files_properties(lldir_linux.cpp
  38. PROPERTIES COMPILE_FLAGS
  39. "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\""
  40. )
  41. endif (VIEWER AND INSTALL)
  42. endif (LINUX)
  43. if (WINDOWS)
  44. LIST(APPEND llvfs_SOURCE_FILES lldir_win32.cpp)
  45. LIST(APPEND llvfs_HEADER_FILES lldir_win32.h)
  46. endif (WINDOWS)
  47. set_source_files_properties(${llvfs_HEADER_FILES}
  48. PROPERTIES HEADER_FILE_ONLY TRUE)
  49. list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES})
  50. add_library (llvfs ${llvfs_SOURCE_FILES})
  51. set(vfs_BOOST_LIBRARIES
  52. ${BOOST_FILESYSTEM_LIBRARY}
  53. ${BOOST_SYSTEM_LIBRARY}
  54. )
  55. target_link_libraries(llvfs
  56. ${vfs_BOOST_LIBRARIES}
  57. )
  58. if (DARWIN)
  59. include(CMakeFindFrameworks)
  60. find_library(CARBON_LIBRARY Carbon)
  61. target_link_libraries(llvfs ${CARBON_LIBRARY})
  62. endif (DARWIN)
  63. # Add tests
  64. if (LL_TESTS)
  65. include(LLAddBuildTest)
  66. # UNIT TESTS
  67. SET(llvfs_TEST_SOURCE_FILES
  68. lldiriterator.cpp
  69. )
  70. set_source_files_properties(lldiriterator.cpp
  71. PROPERTIES
  72. LL_TEST_ADDITIONAL_LIBRARIES "${vfs_BOOST_LIBRARIES}"
  73. )
  74. LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
  75. # INTEGRATION TESTS
  76. set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
  77. # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
  78. LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
  79. endif (LL_TESTS)