summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-12-15 20:55:02 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-12-15 21:36:58 +0200
commit2800905ac354fec6316cf83da85eb5f4c6060741 (patch)
tree56ca4cb7d8de5ce698a164bb869812c16164c21a /indra/llfilesystem/CMakeLists.txt
parent6583fdf526c356b47122de3894b0fb68d83ae50b (diff)
parent0a873cd95547f003878c6d00d0883ff792f4a865 (diff)
Merge branch master (DRTVWR-552) into DRTVWR-542-meshopt
+resolved viewer-manager's inherited conflict
Diffstat (limited to 'indra/llfilesystem/CMakeLists.txt')
-rw-r--r--indra/llfilesystem/CMakeLists.txt99
1 files changed, 99 insertions, 0 deletions
diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt
new file mode 100644
index 0000000000..09c4c33ebf
--- /dev/null
+++ b/indra/llfilesystem/CMakeLists.txt
@@ -0,0 +1,99 @@
+# -*- cmake -*-
+
+project(llfilesystem)
+
+include(00-Common)
+include(LLCommon)
+include(UnixInstall)
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ )
+
+set(llfilesystem_SOURCE_FILES
+ lldir.cpp
+ lldiriterator.cpp
+ lllfsthread.cpp
+ lldiskcache.cpp
+ llfilesystem.cpp
+ )
+
+set(llfilesystem_HEADER_FILES
+ CMakeLists.txt
+ lldir.h
+ lldirguard.h
+ lldiriterator.h
+ lllfsthread.h
+ lldiskcache.h
+ llfilesystem.h
+ )
+
+if (DARWIN)
+ LIST(APPEND llfilesystem_SOURCE_FILES lldir_utils_objc.mm)
+ LIST(APPEND llfilesystem_SOURCE_FILES lldir_utils_objc.h)
+ LIST(APPEND llfilesystem_SOURCE_FILES lldir_mac.cpp)
+ LIST(APPEND llfilesystem_HEADER_FILES lldir_mac.h)
+endif (DARWIN)
+
+if (LINUX)
+ LIST(APPEND llfilesystem_SOURCE_FILES lldir_linux.cpp)
+ LIST(APPEND llfilesystem_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 llfilesystem_SOURCE_FILES lldir_win32.cpp)
+ LIST(APPEND llfilesystem_HEADER_FILES lldir_win32.h)
+endif (WINDOWS)
+
+set_source_files_properties(${llfilesystem_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llfilesystem_SOURCE_FILES ${llfilesystem_HEADER_FILES})
+
+add_library (llfilesystem ${llfilesystem_SOURCE_FILES})
+
+set(cache_BOOST_LIBRARIES
+ ${BOOST_FILESYSTEM_LIBRARY}
+ ${BOOST_SYSTEM_LIBRARY}
+ )
+
+target_link_libraries(llfilesystem
+ ${LLCOMMON_LIBRARIES}
+ ${cache_BOOST_LIBRARIES}
+ )
+
+if (DARWIN)
+ include(CMakeFindFrameworks)
+ find_library(COCOA_LIBRARY Cocoa)
+ target_link_libraries(llfilesystem ${COCOA_LIBRARY})
+endif (DARWIN)
+
+
+# Add tests
+if (LL_TESTS)
+ include(LLAddBuildTest)
+ # UNIT TESTS
+ SET(llfilesystem_TEST_SOURCE_FILES
+ lldiriterator.cpp
+ )
+
+ set_source_files_properties(lldiriterator.cpp
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${cache_BOOST_LIBRARIES}"
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}")
+
+ # INTEGRATION TESTS
+ set(test_libs llmath llcommon llfilesystem ${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)