mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
only import codegen when not building it
This commit is contained in:
parent
eb72059c3e
commit
8fe349d259
2 changed files with 8 additions and 2 deletions
|
@ -66,6 +66,8 @@ function(setup_geode_mod)
|
|||
add_subdirectory(${GEODE_SDK_PATH}/codegen ${GEODE_CODEGEN_DIR})
|
||||
add_dependencies(${PROJECT_NAME} CodegenRun)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC -DGEODE_BUILDING_CODEGEN)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC -DPROJECT_NAME=${PROJECT_NAME} -DEXPORT_${PROJECT_NAME}=1)
|
||||
|
|
|
@ -79,9 +79,13 @@ namespace std {
|
|||
#endif
|
||||
|
||||
#ifdef GEODE_EXPORTING_CODEGEN
|
||||
#define GEODE_CODEGEN_DLL __declspec(dllexport)
|
||||
#define GEODE_CODEGEN_DLL __declspec(dllexport)
|
||||
#else
|
||||
#define GEODE_CODEGEN_DLL __declspec(dllimport)
|
||||
#ifndef GEODE_BUILDING_CODEGEN
|
||||
#define GEODE_CODEGEN_DLL __declspec(dllimport)
|
||||
#else
|
||||
#define GEODE_CODEGEN_DLL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define GEODE_API extern "C" __declspec(dllexport)
|
||||
|
|
Loading…
Reference in a new issue