Clean up CMakeLists

This commit is contained in:
Sarah Jamie Lewis 2023-07-06 15:03:40 -07:00
parent 3d478b56a3
commit 1a6a57691c
1 changed files with 4 additions and 4 deletions

View File

@ -41,10 +41,10 @@ endif()
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PUBLIC -Os -Wall -Werror -fno-ident -Qn)
target_compile_options(${TARGET} PRIVATE -Os -Wall -Werror -fno-ident -Qn)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>" -fno-ident -Qn)
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
target_link_libraries(${TARGET} PUBLIC -Qn -Os -Wl,--hash-style=gnu,--build-id=none)
target_link_libraries(${TARGET} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none)
endfunction()
# Flutter library and tool build rules.
@ -74,10 +74,10 @@ add_executable(${BINARY_NAME}
apply_standard_settings(${BINARY_NAME})
# Add dependency libraries. Add any application-specific dependencies here.
target_compile_options(${BINARY_NAME} PUBLIC -Os -fno-ident -Qn)
target_compile_options(${BINARY_NAME} PRIVATE -Os -fno-ident -Qn)
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
target_link_libraries(${BINARY_NAME} PUBLIC -Qn -Os -Wl,--hash-style=gnu,--build-id=none)
target_link_libraries(${BINARY_NAME} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none)
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)