Compare commits
4 Commits
de4e08bfdd
...
c2246dae07
Author | SHA1 | Date |
---|---|---|
|
c2246dae07 | |
|
1c19d627aa | |
|
646c71c277 | |
|
826c50e162 |
|
@ -214,3 +214,27 @@ set_target_properties(${PROJECT_NAME}
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
|
||||||
OUTPUT_NAME "${OUTPUT_NAME}"
|
OUTPUT_NAME "${OUTPUT_NAME}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(TARGETS ${PROJECT_NAME} EXPORT godot_cpp_targets)
|
||||||
|
|
||||||
|
# Export the target to the build directory.
|
||||||
|
# The target then can be imported by another cmake project like this:
|
||||||
|
# find_package(godot-cpp CONFIG REQUIRED)
|
||||||
|
#
|
||||||
|
# add_library(libfoo SHARED)
|
||||||
|
# set_target_properties(libfoo PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||||
|
# target_link_libraries(libfoo PUBLIC godot::godot-cpp)
|
||||||
|
#
|
||||||
|
# And user provides the build directory to cmake:
|
||||||
|
# -DCMAKE_PREFIX_PATH=<absolute-path-to-godot-cpp-build-dir>.
|
||||||
|
|
||||||
|
export(EXPORT godot_cpp_targets
|
||||||
|
FILE "${PROJECT_BINARY_DIR}/cmake/godot-cpp.cmake"
|
||||||
|
NAMESPACE godot::
|
||||||
|
)
|
||||||
|
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/config.cmake.in
|
||||||
|
"${PROJECT_BINARY_DIR}/cmake/godot-cpp-config.cmake"
|
||||||
|
INSTALL_DESTINATION "lib/cmake/godot-cpp"
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/godot-cpp.cmake")
|
||||||
|
|
||||||
|
check_required_components(godot-cpp)
|
|
@ -356,6 +356,12 @@ String vformat(const String &p_text, const VarArgs... p_args) {
|
||||||
|
|
||||||
#include <godot_cpp/variant/builtin_vararg_methods.hpp>
|
#include <godot_cpp/variant/builtin_vararg_methods.hpp>
|
||||||
|
|
||||||
|
#ifdef REAL_T_IS_DOUBLE
|
||||||
|
using PackedRealArray = PackedFloat64Array;
|
||||||
|
#else
|
||||||
|
using PackedRealArray = PackedFloat32Array;
|
||||||
|
#endif // REAL_T_IS_DOUBLE
|
||||||
|
|
||||||
} // namespace godot
|
} // namespace godot
|
||||||
|
|
||||||
#endif // GODOT_VARIANT_HPP
|
#endif // GODOT_VARIANT_HPP
|
||||||
|
|
Loading…
Reference in New Issue