SHARE
TWEET

GDNative Godot C++

a guest Nov 22nd, 2019 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Put this in PROJECT_DIR/cmake/Modules
  2. # Add set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") to your CMakeLists.txt
  3. # Add find_package(GodotCpp REQUIRED) to your CMakeLists.txt
  4. # Add target_link_libraries(myLibrary PUBLIC ${GodotCpp_LIBRARY} )
  5. # Add target_include_directories(myLibrary PUBLIC ${GodotCpp_INCLUDE_DIR} )
  6.  
  7. # - Try to find GodotCpp
  8. # Once done this will define
  9. #  GodotCpp_FOUND - System has GodotCpp
  10. #  GodotCpp_INCLUDE_DIRS - The GodotCpp include directories
  11. #  GodotCpp_LIBRARIES - The libraries needed to use GodotCpp
  12. #  GodotCpp_DEFINITIONS - Compiler switches required for using GodotCpp
  13.  
  14. find_package(PkgConfig)
  15.  
  16. set(GodotCpp_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../godot-cpp/include/"
  17.         "${CMAKE_SOURCE_DIR}/../godot-cpp/include/core/"
  18.         "${CMAKE_SOURCE_DIR}/../godot-cpp/include/gen/"
  19.         "${CMAKE_SOURCE_DIR}/../godot-cpp/godot_headers/")
  20.  
  21. if (UNIX)
  22.     find_library(GodotCpp_LIBRARY NAMES libgodot-cpp.linux.release.64.a libgodot-cpp.linux.debug.64.a
  23.             HINTS "${CMAKE_SOURCE_DIR}/../godot-cpp/bin/")
  24. endif()
  25.  
  26. find_package_handle_standard_args(GodotCpp  DEFAULT_MSG
  27.         GodotCpp_LIBRARY GodotCpp_INCLUDE_DIR)
  28.  
  29. mark_as_advanced(GodotCpp_INCLUDE_DIR GodotCpp_LIBRARY )
  30.  
  31. set(GodotCpp_LIBRARIES ${GodotCpp_LIBRARY} )
  32. set(GodotCpp_INCLUDE_DIRS ${GodotCpp_INCLUDE_DIR} )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top