fix setup_geode_mod not linking sdk if cli calls are disabled

This commit is contained in:
hjfod 2023-03-21 08:54:11 +02:00
parent 7d953793e2
commit 4318a8d53e

View file

@ -53,6 +53,13 @@ function(setup_geode_mod proname)
set(multiValueArgs EXTERNALS)
cmake_parse_arguments(SETUP_GEODE_MOD "${options}" "" "${multiValueArgs}" ${ARGN})
# Add package target + make output name the mod id
set_target_properties(${proname} PROPERTIES PREFIX "")
set_target_properties(${proname} PROPERTIES OUTPUT_NAME ${MOD_ID})
# Link Geode to the mod
target_link_libraries(${proname} geode-sdk)
if (GEODE_DISABLE_CLI_CALLS)
message("Skipping setting up geode mod ${proname}")
return()
@ -124,10 +131,6 @@ function(setup_geode_mod proname)
set(HAS_HEADERS Off)
endif()
# Add package target + make output name the mod id
set_target_properties(${proname} PROPERTIES PREFIX "")
set_target_properties(${proname} PROPERTIES OUTPUT_NAME ${MOD_ID})
# todo: figure out how to either not make cmake shit itself and print out --binary path/to/dll "" or
# make cli not shit itself when it sees that
if (HAS_HEADERS)
@ -199,9 +202,6 @@ function(setup_geode_mod proname)
endif()
# Link Geode to the mod
target_link_libraries(${proname} geode-sdk)
endfunction()
function(create_geode_file proname)