From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001 From: Nicky 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/cmake/CEFPlugin.cmake | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/cmake/CEFPlugin.cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 7d8bfb1b0f..706730b226 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -2,18 +2,21 @@ include(Linking) include(Prebuilt) +if(TARGET cef::cef) + return() +endif() +create_target( cef::cef ) + if (USESYSTEMLIBS) set(CEFPLUGIN OFF CACHE BOOL "CEFPLUGIN support for the llplugin/llmedia test apps.") else (USESYSTEMLIBS) use_prebuilt_binary(dullahan) - set(CEFPLUGIN ON CACHE BOOL - "CEFPLUGIN support for the llplugin/llmedia test apps.") - set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef) + set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) endif (USESYSTEMLIBS) if (WINDOWS) - set(CEF_PLUGIN_LIBRARIES + set_target_libraries( cef::cef libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -29,7 +32,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - set(CEF_PLUGIN_LIBRARIES + set_target_libraries( cef::cef ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} -- cgit v1.2.3 From d3521b4462195cfe882b2cc8eb4e7c5e948c0fb6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 10:28:46 +0200 Subject: Remove obsolete and unmaintained USE_SYSTEMLIBS --- indra/cmake/CEFPlugin.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'indra/cmake/CEFPlugin.cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 706730b226..bcce4cfa05 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -7,13 +7,8 @@ if(TARGET cef::cef) endif() create_target( cef::cef ) -if (USESYSTEMLIBS) - set(CEFPLUGIN OFF CACHE BOOL - "CEFPLUGIN support for the llplugin/llmedia test apps.") -else (USESYSTEMLIBS) - use_prebuilt_binary(dullahan) - set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) -endif (USESYSTEMLIBS) +use_prebuilt_binary(dullahan) +set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) set_target_libraries( cef::cef -- cgit v1.2.3 From 241919e7f7986c11586a49bff53cf19c2c0e0ea6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 19:21:55 +0200 Subject: Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard(). --- indra/cmake/CEFPlugin.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/cmake/CEFPlugin.cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index bcce4cfa05..6dba5e26ac 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -2,9 +2,7 @@ include(Linking) include(Prebuilt) -if(TARGET cef::cef) - return() -endif() +include_guard() create_target( cef::cef ) use_prebuilt_binary(dullahan) -- cgit v1.2.3 From 6d0bba9c03da0d8aca5e88fcb9289cb2f89f3467 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 17:32:14 +0200 Subject: Switch over to standard target_link_libraries (cmake requirements are high enough now). --- indra/cmake/CEFPlugin.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake/CEFPlugin.cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 6dba5e26ac..41d1b521f7 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -9,7 +9,7 @@ use_prebuilt_binary(dullahan) set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) - set_target_libraries( cef::cef + target_link_libraries( cef::cef INTERFACE libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -25,7 +25,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - set_target_libraries( cef::cef + target_link_libraries( cef::cef INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} -- cgit v1.2.3 From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001 From: Nicky 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/cmake/CEFPlugin.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/cmake/CEFPlugin.cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 41d1b521f7..2b5db1773b 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -3,13 +3,13 @@ include(Linking) include(Prebuilt) include_guard() -create_target( cef::cef ) +create_target( ll::cef ) use_prebuilt_binary(dullahan) -set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) +target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) - target_link_libraries( cef::cef INTERFACE + target_link_libraries( ll::cef INTERFACE libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -25,7 +25,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - target_link_libraries( cef::cef INTERFACE + target_link_libraries( ll::cef INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} -- cgit v1.2.3 From 363f2df4fa22b3eb95ff4603d73b7a042f3fefd1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:28:55 +0200 Subject: Remove function create_target and instead directly use add_library --- indra/cmake/CEFPlugin.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake/CEFPlugin.cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 2b5db1773b..9b77becf29 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -3,7 +3,7 @@ include(Linking) include(Prebuilt) include_guard() -create_target( ll::cef ) +add_library( ll::cef INTERFACE IMPORTED ) use_prebuilt_binary(dullahan) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) -- cgit v1.2.3