Update CMakeLists.txt
changes so this cmake file can be used as a subdirectory ``` add_subdirectory(godot-cpp) project(project-name) add_library(project-name SHARED src/init.cpp) target_link_libraries(project-name godot-cpp) ```pull/269/head
parent
7c8e42b56a
commit
51233fa1a9
|
@ -133,7 +133,7 @@ endif()
|
||||||
# Generate source from the bindings file
|
# Generate source from the bindings file
|
||||||
message(STATUS "Generating Bindings")
|
message(STATUS "Generating Bindings")
|
||||||
execute_process(COMMAND "python" "-c" "import binding_generator; binding_generator.generate_bindings(\"${GODOT_CUSTOM_API_FILE}\")"
|
execute_process(COMMAND "python" "-c" "import binding_generator; binding_generator.generate_bindings(\"${GODOT_CUSTOM_API_FILE}\")"
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
RESULT_VARIABLE GENERATION_RESULT
|
RESULT_VARIABLE GENERATION_RESULT
|
||||||
OUTPUT_VARIABLE GENERATION_OUTPUT)
|
OUTPUT_VARIABLE GENERATION_OUTPUT)
|
||||||
message(STATUS ${GENERATION_RESULT} ${GENERATION_OUTPUT})
|
message(STATUS ${GENERATION_RESULT} ${GENERATION_OUTPUT})
|
||||||
|
@ -145,7 +145,7 @@ file(GLOB_RECURSE HEADERS include/*.h**)
|
||||||
# Define our godot-cpp library
|
# Define our godot-cpp library
|
||||||
add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
||||||
target_include_directories(${PROJECT_NAME}
|
target_include_directories(${PROJECT_NAME}
|
||||||
PRIVATE
|
PUBLIC
|
||||||
include
|
include
|
||||||
include/core
|
include/core
|
||||||
include/gen
|
include/gen
|
||||||
|
|
Loading…
Reference in New Issue