Skip to content

Commit

Permalink
Try fix cmake config
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksigron committed Nov 9, 2024
1 parent 3650a5b commit fb22a73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ set(ENGINE_PATH "${PROJECT_ROOT}/engine")

add_subdirectory(editor kokko-editor-build)
add_subdirectory(render-test kokko-render-test-build)

message(KOKKO_USE_SANITIZER=${KOKKO_USE_SANITIZER})
6 changes: 3 additions & 3 deletions editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ target_compile_definitions(${EXECUTABLE_NAME} PRIVATE
IMGUI_IMPL_OPENGL_LOADER_GLAD
)

if(USE_SANITIZER)
target_compile_options(${EXECUTABLE_NAME} INTERFACE -fsanitize=${USE_SANITIZER})
target_link_options(${EXECUTABLE_NAME} INTERFACE -fsanitize=${USE_SANITIZER})
if(${KOKKO_USE_SANITIZER})
target_compile_options(${EXECUTABLE_NAME} INTERFACE -fsanitize=${KOKKO_USE_SANITIZER})
target_link_options(${EXECUTABLE_NAME} INTERFACE -fsanitize=${KOKKO_USE_SANITIZER})
endif()

target_link_libraries(${EXECUTABLE_NAME} ${KOKKO_LIB})
6 changes: 3 additions & 3 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ target_link_libraries(${KOKKO_LIB} PUBLIC OpenGL::GL)
target_compile_definitions(${KOKKO_LIB} PUBLIC KOKKO_USE_OPENGL)
endif()

if(USE_SANITIZER)
target_compile_options(${KOKKO_LIB} INTERFACE -fsanitize=${USE_SANITIZER})
target_link_options(${KOKKO_LIB} INTERFACE -fsanitize=${USE_SANITIZER})
if(${KOKKO_USE_SANITIZER})
target_compile_options(${KOKKO_LIB} INTERFACE -fsanitize=${KOKKO_USE_SANITIZER})
target_link_options(${KOKKO_LIB} INTERFACE -fsanitize=${KOKKO_USE_SANITIZER})
endif()

0 comments on commit fb22a73

Please sign in to comment.