[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/01: Support specified CMake version.

noreply at xfce.org noreply at xfce.org
Fri Feb 7 18:57:58 CET 2020


This is an automated email from the git hooks/post-receive script.

g   o   t   t   c   o   d   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 745b3364ade7a0ad446baedeca03661d0bfa1134
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Feb 7 05:45:38 2020 -0500

    Support specified CMake version.
---
 panel-plugin/CMakeLists.txt | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/panel-plugin/CMakeLists.txt b/panel-plugin/CMakeLists.txt
index 3132915..47e4cfa 100644
--- a/panel-plugin/CMakeLists.txt
+++ b/panel-plugin/CMakeLists.txt
@@ -63,16 +63,33 @@ if(ENABLE_VISIBILITY)
 	set_target_properties(whiskermenu PROPERTIES CXX_VISIBILITY_PRESET hidden)
 endif()
 
-if(ENABLE_AS_NEEDED)
-	target_link_options(whiskermenu PRIVATE "LINKER:--as-needed")
-endif()
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
+	if(ENABLE_AS_NEEDED)
+		target_link_options(whiskermenu PRIVATE "LINKER:--as-needed")
+	endif()
+
+	if(ENABLE_LINKER_OPTIMIZED_HASH_TABLES)
+		target_link_options(whiskermenu PRIVATE "LINKER:-O1")
+	endif()
+
+	if(ENABLE_DEVELOPER_MODE)
+		target_link_options(whiskermenu PRIVATE "LINKER:-z,defs")
+	endif()
+else()
+	if(ENABLE_AS_NEEDED)
+		set_property(TARGET whiskermenu APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--as-needed")
+	endif()
 
-if(ENABLE_LINKER_OPTIMIZED_HASH_TABLES)
-	target_link_options(whiskermenu PRIVATE "LINKER:-O1")
+	if(ENABLE_LINKER_OPTIMIZED_HASH_TABLES)
+		set_property(TARGET whiskermenu APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-O1")
+	endif()
+
+	if(ENABLE_DEVELOPER_MODE)
+		set_property(TARGET whiskermenu APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-z,defs")
+	endif()
 endif()
 
 if(ENABLE_DEVELOPER_MODE)
-	target_link_options(whiskermenu PRIVATE "LINKER:-z,defs")
 	target_compile_options(whiskermenu PRIVATE -Werror)
 	target_compile_definitions(whiskermenu PRIVATE
 		XFCE_DISABLE_DEPRECATED

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list