mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
a hacky way to supress the generatedsource.cpp not found error and a random patch to fix loader being built even though its not top level
This commit is contained in:
parent
1f0482be97
commit
4348a7d547
1 changed files with 8 additions and 1 deletions
|
@ -30,6 +30,12 @@ add_custom_target(CodegenRun ALL
|
|||
add_dependencies(${PROJECT_NAME} CodegenRun)
|
||||
add_dependencies(CodegenRun Codegen)
|
||||
|
||||
# Hacky way to supress the not generated error
|
||||
if (NOT EXISTS ${GEODE_CODEGEN_PATH}/GeneratedSource.cpp)
|
||||
make_directory(${GEODE_CODEGEN_PATH})
|
||||
execute_process(COMMAND touch ${GEODE_CODEGEN_PATH}/GeneratedSource.cpp)
|
||||
endif()
|
||||
|
||||
target_sources(${PROJECT_NAME} INTERFACE ${GEODE_CODEGEN_PATH}/GeneratedSource.cpp)
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE ${GEODE_CODEGEN_PATH}/..)
|
||||
|
||||
|
@ -50,7 +56,7 @@ add_subdirectory(fmt)
|
|||
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE filesystem fmt)
|
||||
|
||||
add_subdirectory(loader)
|
||||
|
||||
|
||||
if (NOT EXISTS ${GEODE_BIN_PATH})
|
||||
make_directory(${GEODE_BIN_PATH})
|
||||
|
@ -64,6 +70,7 @@ endif()
|
|||
|
||||
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
add_subdirectory(loader)
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE geode-loader)
|
||||
elseif(EXISTS ${GEODE_PLATFORM_BIN_PATH})
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE "${GEODE_PLATFORM_BIN_PATH}")
|
||||
|
|
Loading…
Reference in a new issue