summaryrefslogtreecommitdiff
path: root/indra/llvfs/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2021-03-08 13:56:16 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2021-03-08 13:56:16 +0000
commitc83e740ef94e16ba85574454f3138905edecb029 (patch)
tree6e10779ff7b2df5194a3df9d100ba28d53883166 /indra/llvfs/CMakeLists.txt
parent2b385841f3031d599bdb226f0f859e51b09870f8 (diff)
Revert "Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519"
This reverts commit e61f485a04dc8c8ac6bcf6a24848359092884d14, reversing changes made to 00c47d079f7e958e473ed4083a7f7691fa02dcd5.
Diffstat (limited to 'indra/llvfs/CMakeLists.txt')
-rw-r--r--indra/llvfs/CMakeLists.txt104
1 files changed, 104 insertions, 0 deletions
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
new file mode 100644
index 0000000000..67dce8c073
--- /dev/null
+++ b/indra/llvfs/CMakeLists.txt
@@ -0,0 +1,104 @@
+# -*- cmake -*-
+
+project(llvfs)
+
+include(00-Common)
+include(LLCommon)
+include(UnixInstall)
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ )
+
+set(llvfs_SOURCE_FILES
+ lldir.cpp
+ lldiriterator.cpp
+ lllfsthread.cpp
+ llpidlock.cpp
+ llvfile.cpp
+ llvfs.cpp
+ llvfsthread.cpp
+ )
+
+set(llvfs_HEADER_FILES
+ CMakeLists.txt
+
+ lldir.h
+ lldirguard.h
+ lldiriterator.h
+ lllfsthread.h
+ llpidlock.h
+ llvfile.h
+ llvfs.h
+ llvfsthread.h
+ )
+
+if (DARWIN)
+ LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp)
+ LIST(APPEND llvfs_HEADER_FILES lldir_mac.h)
+ LIST(APPEND llvfs_SOURCE_FILES llvfs_objc.mm)
+ LIST(APPEND llvfs_HEADER_FILES llvfs_objc.h)
+endif (DARWIN)
+
+if (LINUX)
+ LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
+ LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
+
+ if (INSTALL)
+ set_source_files_properties(lldir_linux.cpp
+ PROPERTIES COMPILE_FLAGS
+ "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\""
+ )
+ endif (INSTALL)
+endif (LINUX)
+
+if (WINDOWS)
+ LIST(APPEND llvfs_SOURCE_FILES lldir_win32.cpp)
+ LIST(APPEND llvfs_HEADER_FILES lldir_win32.h)
+endif (WINDOWS)
+
+set_source_files_properties(${llvfs_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES})
+
+add_library (llvfs ${llvfs_SOURCE_FILES})
+
+set(vfs_BOOST_LIBRARIES
+ ${BOOST_FILESYSTEM_LIBRARY}
+ ${BOOST_SYSTEM_LIBRARY}
+ )
+
+target_link_libraries(llvfs
+ ${LLCOMMON_LIBRARIES}
+ ${vfs_BOOST_LIBRARIES}
+ )
+
+if (DARWIN)
+ include(CMakeFindFrameworks)
+ find_library(COCOA_LIBRARY Cocoa)
+ target_link_libraries(llvfs ${COCOA_LIBRARY})
+endif (DARWIN)
+
+
+# Add tests
+if (LL_TESTS)
+ include(LLAddBuildTest)
+ # UNIT TESTS
+ SET(llvfs_TEST_SOURCE_FILES
+ lldiriterator.cpp
+ )
+
+ set_source_files_properties(lldiriterator.cpp
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${vfs_BOOST_LIBRARIES}"
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
+
+ # INTEGRATION TESTS
+ set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+
+ # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
+ LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
+endif (LL_TESTS)