From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001
From: Nicky <nicky.dasmijn@gmail.com>
Date: Wed, 6 Apr 2022 16:32:52 +0200
Subject: Move CMake files to modernized cmake syntax, step 1. Change projects
 to cmake targetsto get rid of havig to hardcore include directories and link
 libraries in consumer projects.

---
 indra/llappearance/CMakeLists.txt | 64 ++++++++++++++-------------------------
 1 file changed, 22 insertions(+), 42 deletions(-)

(limited to 'indra/llappearance')

diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt
index 268849ad74..321c1e1798 100644
--- a/indra/llappearance/CMakeLists.txt
+++ b/indra/llappearance/CMakeLists.txt
@@ -4,30 +4,11 @@ project(llappearance)
 
 include(00-Common)
 include(LLCommon)
-include(LLCharacter)
 include(LLImage)
-include(LLInventory)
-include(LLMath)
-include(LLMessage)
 include(LLCoreHttp)
-include(LLRender)
-include(LLFileSystem)
 include(LLWindow)
-include(LLXML)
 include(Linking)
 
-include_directories(
-    ${LLCOMMON_INCLUDE_DIRS}
-    ${LLCHARACTER_INCLUDE_DIRS}
-    ${LLIMAGE_INCLUDE_DIRS}
-    ${LLINVENTORY_INCLUDE_DIRS}
-    ${LLMATH_INCLUDE_DIRS}
-    ${LLRENDER_INCLUDE_DIRS}
-    ${LLFILESYSTEM_INCLUDE_DIRS}
-    ${LLWINDOW_INCLUDE_DIRS}
-    ${LLXML_INCLUDE_DIRS}
-    )
-
 set(llappearance_SOURCE_FILES
     llavatarappearance.cpp
     llavatarjoint.cpp
@@ -79,33 +60,32 @@ list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES})
 add_library (llappearance ${llappearance_SOURCE_FILES})
 
 target_link_libraries(llappearance
-    ${LLCHARACTER_LIBRARIES}
-    ${LLINVENTORY_LIBRARIES}
-    ${LLIMAGE_LIBRARIES}
-    ${LLRENDER_LIBRARIES}
-    ${LLFILESYSTEM_LIBRARIES}
-    ${LLMATH_LIBRARIES}
-    ${LLXML_LIBRARIES}
-    ${LLMATH_LIBRARIES}
-    ${LLMESSAGE_LIBRARIES}
-    ${LLCOREHTTP_LIBRARIES}
-    ${LLCOMMON_LIBRARIES}
+        llcharacter
+        llinventory
+        llimage
+        llrender
+        llfilesystem
+        llmath
+        llxml
+        llmessage
+        llcorehttp
+        llcommon
     )
+set_target_include_dirs( llappearance ${CMAKE_CURRENT_SOURCE_DIR})
 
 if (BUILD_HEADLESS)
   add_library (llappearanceheadless ${llappearance_SOURCE_FILES})
-  
+  set_target_include_dirs( llappearanceheadless ${CMAKE_CURRENT_SOURCE_DIR})
+
   target_link_libraries(llappearanceheadless
-      ${LLCHARACTER_LIBRARIES}
-      ${LLINVENTORY_LIBRARIES}
-      ${LLIMAGE_LIBRARIES}
-      ${LLRENDERHEADLESS_LIBRARIES}
-      ${LLFILESYSTEM_LIBRARIES}
-      ${LLMATH_LIBRARIES}
-      ${LLXML_LIBRARIES}
-      ${LLMATH_LIBRARIES}
-      ${LLMESSAGE_LIBRARIES}
-      ${LLCOREHTTP_LIBRARIES}
-      ${LLCOMMON_LIBRARIES}
+          llcharacter
+          llinventory
+          llimage
+          llfilesystem
+          llmath
+          llxml
+          llmessage
+          llcorehttp
+          llcommon
       )
 endif (BUILD_HEADLESS)
-- 
cgit v1.2.3


From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001
From: Nicky <nicky.dasmijn@gmail.com>
Date: Sun, 17 Apr 2022 18:04:57 +0200
Subject: Switch to target_include_directories All 3Ps include dirs are treated
 as SYSTEM, this will stop compilers stop emitting warnings from those files
 and greatly helps having high warning levels and not being swamped by
 warnings that come from external libraries.

---
 indra/llappearance/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/llappearance')

diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt
index 321c1e1798..4516a95d80 100644
--- a/indra/llappearance/CMakeLists.txt
+++ b/indra/llappearance/CMakeLists.txt
@@ -71,11 +71,11 @@ target_link_libraries(llappearance
         llcorehttp
         llcommon
     )
-set_target_include_dirs( llappearance ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories( llappearance  INTERFACE   ${CMAKE_CURRENT_SOURCE_DIR})
 
 if (BUILD_HEADLESS)
   add_library (llappearanceheadless ${llappearance_SOURCE_FILES})
-  set_target_include_dirs( llappearanceheadless ${CMAKE_CURRENT_SOURCE_DIR})
+  target_include_directories( llappearanceheadless  INTERFACE   ${CMAKE_CURRENT_SOURCE_DIR})
 
   target_link_libraries(llappearanceheadless
           llcharacter
-- 
cgit v1.2.3


From 283c2a20cc4ef856076d287303c7143332b201fe Mon Sep 17 00:00:00 2001
From: Nicky <nicky.dasmijn@gmail.com>
Date: Sun, 1 May 2022 00:38:40 +0200
Subject: Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically
 sets the property on those.

---
 indra/llappearance/CMakeLists.txt | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'indra/llappearance')

diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt
index 4516a95d80..75c0e276eb 100644
--- a/indra/llappearance/CMakeLists.txt
+++ b/indra/llappearance/CMakeLists.txt
@@ -52,9 +52,6 @@ set(llappearance_HEADER_FILES
     llavatarappearancedefines.h
     )
 
-set_source_files_properties(${llappearance_HEADER_FILES}
-                            PROPERTIES HEADER_FILE_ONLY TRUE)
-
 list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES})
 
 add_library (llappearance ${llappearance_SOURCE_FILES})
-- 
cgit v1.2.3