Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Put this in PROJECT_DIR/cmake/Modules
- # Add set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") to your CMakeLists.txt
- # Add find_package(GodotCpp REQUIRED) to your CMakeLists.txt
- # Add target_link_libraries(myLibrary PUBLIC ${GodotCpp_LIBRARY} )
- # Add target_include_directories(myLibrary PUBLIC ${GodotCpp_INCLUDE_DIR} )
- # - Try to find GodotCpp
- # Once done this will define
- # GodotCpp_FOUND - System has GodotCpp
- # GodotCpp_INCLUDE_DIRS - The GodotCpp include directories
- # GodotCpp_LIBRARIES - The libraries needed to use GodotCpp
- # GodotCpp_DEFINITIONS - Compiler switches required for using GodotCpp
- find_package(PkgConfig)
- set(GodotCpp_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../godot-cpp/include/"
- "${CMAKE_SOURCE_DIR}/../godot-cpp/include/core/"
- "${CMAKE_SOURCE_DIR}/../godot-cpp/include/gen/"
- "${CMAKE_SOURCE_DIR}/../godot-cpp/godot_headers/")
- if (UNIX)
- find_library(GodotCpp_LIBRARY NAMES libgodot-cpp.linux.release.64.a libgodot-cpp.linux.debug.64.a
- HINTS "${CMAKE_SOURCE_DIR}/../godot-cpp/bin/")
- endif()
- find_package_handle_standard_args(GodotCpp DEFAULT_MSG
- GodotCpp_LIBRARY GodotCpp_INCLUDE_DIR)
- mark_as_advanced(GodotCpp_INCLUDE_DIR GodotCpp_LIBRARY )
- set(GodotCpp_LIBRARIES ${GodotCpp_LIBRARY} )
- set(GodotCpp_INCLUDE_DIRS ${GodotCpp_INCLUDE_DIR} )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement