diff --git a/cmake/TaichiCore.cmake b/cmake/TaichiCore.cmake index 5a9efd9672e5c..b106039ac8a1c 100644 --- a/cmake/TaichiCore.cmake +++ b/cmake/TaichiCore.cmake @@ -159,7 +159,7 @@ if (TI_WITH_OPENGL OR TI_WITH_VULKAN AND NOT ANDROID) endif() message("Building with GLFW") - target_compile_definitions(${CORE_LIBRARY_NAME} PRIVATE TI_WITH_GLFW) + add_compile_definitions(TI_WITH_GLFW) add_subdirectory(external/glfw) target_link_libraries(${CORE_LIBRARY_NAME} PRIVATE glfw) target_include_directories(${CORE_LIBRARY_NAME} PUBLIC external/glfw/include)