Compare commits

...

4 Commits

Author SHA1 Message Date
Ding, Zhehang "Eox db5b0fc710
Merge 826c50e162 into 36847f6af0 2024-01-30 08:28:30 -07:00
David Snopek 36847f6af0
Merge pull request #1370 from MJacred/patch-1
Update README: fix godot-cpp issue tracker url
2024-01-22 08:57:08 -06:00
MJacred 8a535d0ecc
Update README: fix godot-cpp issue tracker url 2024-01-22 10:50:27 +01:00
Zhehang Ding 826c50e162 Export cmake target config to build directory 2023-02-15 23:40:38 -08:00
3 changed files with 30 additions and 1 deletions

View File

@ -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"
)

View File

@ -58,7 +58,7 @@ first-party `godot-cpp` extension.
Some compatibility breakage is to be expected as GDExtension and `godot-cpp` Some compatibility breakage is to be expected as GDExtension and `godot-cpp`
get more used, documented, and critical issues get resolved. See the get more used, documented, and critical issues get resolved. See the
[Godot issue tracker](https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%3Agdextension) [Godot issue tracker](https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%3Agdextension)
and the [godot-cpp issue tracker](https://github.com/godotengine/godot/issues) and the [godot-cpp issue tracker](https://github.com/godotengine/godot-cpp/issues)
for a list of known issues, and be sure to provide feedback on issues and PRs for a list of known issues, and be sure to provide feedback on issues and PRs
which affect your use of this extension. which affect your use of this extension.

5
cmake/config.cmake.in Normal file
View File

@ -0,0 +1,5 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/godot-cpp.cmake")
check_required_components(godot-cpp)