Cleanup condition for Linux-only CMake configs

This commit is contained in:
Ian McInerney 2023-02-22 01:20:07 +00:00
parent 912f1d5cec
commit 301777f3c9
2 changed files with 7 additions and 9 deletions

View File

@ -102,9 +102,11 @@ option( KICAD_SCRIPTING_WXPYTHON
ON ) ON )
mark_as_advanced( KICAD_SCRIPTING_WXPYTHON ) mark_as_advanced( KICAD_SCRIPTING_WXPYTHON )
option( KICAD_USE_EGL # EGL is only needed on Linux with Wayland
cmake_dependent_option( KICAD_USE_EGL
"Build KiCad with EGL backend support for Wayland." "Build KiCad with EGL backend support for Wayland."
OFF ) OFF "UNIX_NOT_APPLE"
OFF)
cmake_dependent_option( KICAD_USE_BUNDLED_GLEW cmake_dependent_option( KICAD_USE_BUNDLED_GLEW
"Use the bundled version of GLEW - only available when KICAD_USE_EGL is set" "Use the bundled version of GLEW - only available when KICAD_USE_EGL is set"
@ -236,11 +238,9 @@ if( WIN32 OR APPLE )
add_compile_definitions( $<$<BOOL:${KICAD_USE_3DCONNEXION}>:KICAD_USE_3DCONNEXION> ) add_compile_definitions( $<$<BOOL:${KICAD_USE_3DCONNEXION}>:KICAD_USE_3DCONNEXION> )
endif() endif()
if( KICAD_USE_EGL AND UNIX AND NOT APPLE ) if( KICAD_USE_EGL )
message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" ) message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" )
add_compile_definitions( KICAD_USE_EGL ) add_compile_definitions( KICAD_USE_EGL )
elseif( KICAD_USE_EGL )
message( STATUS "Ignoring KICAD_USE_EGL since not on Linux" )
endif() endif()
# Ensure DEBUG is defined for all platforms in Debug builds # Ensure DEBUG is defined for all platforms in Debug builds

View File

@ -84,10 +84,8 @@ target_include_directories( cvpcb_kiface PRIVATE
$<TARGET_PROPERTY:thread-pool,INTERFACE_INCLUDE_DIRECTORIES> $<TARGET_PROPERTY:thread-pool,INTERFACE_INCLUDE_DIRECTORIES>
) )
if( UNIX AND NOT APPLE ) # -lrt must follow Boost on Linux platforms
# -lrt must follow Boost target_link_libraries( cvpcb_kiface $<$<BOOL:${UNIX_NOT_APPLE}>:rt> )
target_link_libraries( cvpcb_kiface rt )
endif()
set_source_files_properties( cvpcb.cpp PROPERTIES set_source_files_properties( cvpcb.cpp PROPERTIES
# The KIFACE is in cvpcb.cpp, export it: # The KIFACE is in cvpcb.cpp, export it: