From 1b09984fe53af1cb9374420c5fe02d2e4c7c77c7 Mon Sep 17 00:00:00 2001 From: Samuel Nicholas Date: Tue, 5 Nov 2024 17:08:40 +1030 Subject: [PATCH] Added the target alias to godot-cpp to reflect recent changes Also pull naming components from godot target properties --- CMakeLists.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 481219d..8c6bbbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,19 +20,21 @@ target_sources( ${PROJECT_NAME} src/register_types.h ) -target_link_libraries( ${PROJECT_NAME} PRIVATE godot-cpp ) +target_link_libraries( ${PROJECT_NAME} PRIVATE godot-cpp::editor ) -set( ARCH_NAME_AMD64 x86_64 ) +get_target_property( GODOT_PLATFORM godot-cpp::editor GODOT_PLATFORM ) +get_target_property( GODOT_TARGET godot-cpp::editor GODOT_TARGET ) +get_target_property( GODOT_ARCH godot-cpp::editor GODOT_ARCH ) +#get_target_property( GODOT_DEV godot-cpp::editor GODOT_DEV ) +#get_target_property( GODOT_DOUBLE godot-cpp::editor GODOT_DOUBLE ) -set( PLATFORM_NAME "$>") -set( TARGET_NAME "$>") -set( DOUBLE "$<$:.double>") -set( ARCH_NAME ${ARCH_NAME_${CMAKE_SYSTEM_PROCESSOR}}) +#set( DEV ".${GODOT_DEV}" ) +#set( DOUBLE ".${GODOT_DOUBLE}" ) set_target_properties( ${PROJECT_NAME} PROPERTIES #The generator expression here prevents a subdir from being created. - RUNTIME_OUTPUT_DIRECTORY "$<$:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}>" - # godot..[.dev][.double].[.custom_suffix][.console].exe - OUTPUT_NAME "${PROJECT_NAME}.${PLATFORM_NAME}.${TARGET_NAME}${DOUBLE}.${ARCH_NAME}" + RUNTIME_OUTPUT_DIRECTORY "$<1:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}>" + # name format project..[.dev][.double].[.custom_suffix] + OUTPUT_NAME "${PROJECT_NAME}.${GODOT_PLATFORM}.${GODOT_TARGET}${DEV}${DOUBLE}.${GODOT_ARCH}" )