Reworked configure_linker_exports

This commit is contained in:
acidicoala
2025-09-26 00:16:15 +05:00
parent d829396c08
commit 922b649fc3
5 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="exports_generator [64] [win]" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="FALSE steam_api64_o $ProjectFileDir$/res/steamworks/*/binaries/steam_api64.dll $CMakeCurrentGenerationDir$/generated/linker_exports_for_steam_api.h" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="SmokeAPI" TARGET_NAME="exports_generator" RUN_TARGET_PROJECT_NAME="SmokeAPI" RUN_TARGET_NAME="exports_generator">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -0,0 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="windows_exports_generator [64]" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--forwarded_dll_name &quot;steam_api64_o&quot; --lib_files_glob &quot;$ProjectFileDir$\res\steamworks\*\binaries\steam_api64.dll&quot; --output_file_path &quot;$CMakeCurrentGenerationDir$\generated\linker_exports_for_steam_api.h&quot; --sources_input_path &quot;&quot;" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="SmokeAPI" TARGET_NAME="windows_exports_generator" CONFIG_NAME="Debug [32]" RUN_TARGET_PROJECT_NAME="SmokeAPI" RUN_TARGET_NAME="windows_exports_generator">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -72,7 +72,6 @@ target_include_directories(SmokeAPI_common INTERFACE
)
target_link_libraries(SmokeAPI_common INTERFACE KoalaBox $<TARGET_OBJECTS:KoalaBox>)
### Static SmokeAPI
add_library(SmokeAPI_static STATIC ${SMOKE_API_STATIC_SOURCES})
@@ -104,9 +103,9 @@ if(WIN32)
configure_linker_exports(
TARGET SmokeAPI
HEADER_NAME "linker_exports_for_steam_api.h"
FORWARDED_DLL "${STEAM_API_MODULE}_o"
INPUT_SOURCES_DIR ""
DLL_FILES_GLOB "${CMAKE_CURRENT_SOURCE_DIR}/res/steamworks/*/binaries/${STEAM_API_MODULE}.dll"
FORWARDED_DLL_NAME "${STEAM_API_MODULE}_o"
LIB_FILES_GLOB "${CMAKE_CURRENT_SOURCE_DIR}/res/steamworks/*/binaries/${STEAM_API_MODULE}.dll"
SOURCES_INPUT_PATH ""
)
set(HEADER_CONTENT "#pragma once\n\n")
@@ -116,9 +115,9 @@ if(WIN32)
configure_linker_exports(
TARGET SmokeAPI
HEADER_NAME "${HEADER_NAME}"
FORWARDED_DLL "C:/Windows/System32/${WIN_DLL}.dll"
INPUT_SOURCES_DIR ""
DLL_FILES_GLOB "C:/Windows/System32/${WIN_DLL}.dll"
FORWARDED_DLL_NAME "C:/Windows/System32/${WIN_DLL}.dll"
LIB_FILES_GLOB "C:/Windows/System32/${WIN_DLL}.dll"
SOURCES_INPUT_PATH ""
)
set(HEADER_CONTENT "${HEADER_CONTENT}#include <${HEADER_NAME}>\n")

View File

@@ -21,10 +21,11 @@
#include "steam_api/virtuals/steam_api_virtuals.hpp"
#include "build_config.h"
#include "proxy_exports.hpp"
#ifdef KB_WIN
#include "koalabox/win.hpp"
#elifdef KB_LINUX
#include "proxy_exports.hpp"
#endif
// Hooking steam_api has shown itself to be less desirable than steamclient