diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-08-08 07:30:46 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-08-08 07:37:27 +0800 |
commit | cfc4f075a82f9dc1156fce6994083143de6727a8 (patch) | |
tree | 2948ea5c6ebfbbc15721a2838804d6a766742887 /indra/cmake | |
parent | 73fdef6693017f1160875d1f7a79875945df3929 (diff) | |
parent | 55f1c8b9797836c9816528bb5b772eb83b083b50 (diff) |
Merge tag 'Second_Life_Release#55f1c8b9-2025.06' into 2025.06
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/Copy3rdPartyLibs.cmake | 11 | ||||
-rw-r--r-- | indra/cmake/Discord.cmake | 19 |
2 files changed, 23 insertions, 7 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 6ac00fd131..0153e69d5b 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -6,6 +6,9 @@ include(CMakeCopyIfDifferent) include(Linking) +if (USE_DISCORD) + include(Discord) +endif () include(OPENAL) # When we copy our dependent libraries, we almost always want to copy them to @@ -75,6 +78,10 @@ if(WINDOWS) endif(ADDRESS_SIZE EQUAL 32) endif (USE_BUGSPLAT) + if (TARGET ll::discord_sdk) + list(APPEND release_files discord_partner_sdk.dll) + endif () + if (TARGET ll::openal) list(APPEND release_files openal32.dll alut.dll) endif () @@ -180,6 +187,10 @@ elseif(DARWIN) ) endif() + if (TARGET ll::discord_sdk) + list(APPEND release_files libdiscord_partner_sdk.dylib) + endif () + if (TARGET ll::openal) list(APPEND release_files libalut.dylib libopenal.dylib) endif () diff --git a/indra/cmake/Discord.cmake b/indra/cmake/Discord.cmake index 52c0765ae7..1896c12853 100644 --- a/indra/cmake/Discord.cmake +++ b/indra/cmake/Discord.cmake @@ -1,18 +1,23 @@ include(Prebuilt) -add_library(ll::discord INTERFACE IMPORTED) -target_compile_definitions(ll::discord INTERFACE LL_DISCORD=1) +include_guard() -if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/discord_installed OR NOT ${discord_installed} EQUAL 0) +add_library(ll::discord_sdk INTERFACE IMPORTED) +target_compile_definitions(ll::discord_sdk INTERFACE LL_DISCORD=1) + +#use_prebuilt_binary(discord_sdk) + +if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/discord_sdk_installed OR NOT ${discord_sdk_installed} EQUAL 0) file(ARCHIVE_EXTRACT INPUT $ENV{HOME}/Downloads/DiscordSocialSdk-1.4.9649.zip DESTINATION ${CMAKE_BINARY_DIR} ) + file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/discord_sdk) file( COPY ${CMAKE_BINARY_DIR}/discord_social_sdk/include/cdiscord.h ${CMAKE_BINARY_DIR}/discord_social_sdk/include/discordpp.h - DESTINATION ${LIBS_PREBUILT_DIR}/include + DESTINATION ${LIBS_PREBUILT_DIR}/include/discord_sdk ) if (WINDOWS) file( @@ -38,8 +43,8 @@ if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKIN DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE} ) endif () - file(WRITE ${PREBUILD_TRACKING_DIR}/discord_installed "0") + file(WRITE ${PREBUILD_TRACKING_DIR}/discord_sdk_installed "0") endif () -target_include_directories(ll::discord SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) -target_link_libraries(ll::discord INTERFACE discord_partner_sdk) +target_include_directories(ll::discord_sdk SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/discord_sdk) +target_link_libraries(ll::discord_sdk INTERFACE discord_partner_sdk) |