Commit 644caf46 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

cmake: add static lrc usage

enable it with -DENABLE_STATIC in cmake command line arguments.

Refs #68993

Change-Id: I91cc3163eca3f5bc8642c9f8dde84db5889264c5
parent 61cbab07
......@@ -56,6 +56,15 @@ ADD_DEFINITIONS(${Qt5Core_CFLAGS})
ADD_DEFINITIONS(${CLUTTER_CFLAGS})
ADD_DEFINITIONS(${CLUTTERGTK_CFLAGS})
IF(NOT ${ENABLE_STATIC} MATCHES false)
SET(QT5_MODULE_PATH ${QT5_PATH}/lib/cmake)
FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core DBus)
FIND_PACKAGE(Qt5DBus REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM ${Qt5DBus_INCLUDE_DIRS} )
LINK_DIRECTORIES(${Qt5DBus_LIBRARY_DIRS} )
ADD_DEFINITIONS(${Qt5DBus_CFLAGS})
ENDIF()
# warnings
ADD_DEFINITIONS(
-Wall
......@@ -167,12 +176,26 @@ GLIB_COMPILE_RESOURCES( GLIB_RESOURCES_RING
ADD_EXECUTABLE(ring-gnome ${GLIB_RESOURCES_RING} ${SRC_FILES})
IF(NOT ${ENABLE_STATIC} MATCHES false)
TARGET_LINK_LIBRARIES(ring-gnome
${LIB_RING_CLIENT_LIBRARY}
${GTK3_LIBRARIES}
Qt5::Core
${Qt5Core_LIBRARIES}
${Qt5DBus_LIBRARIES}
${CLUTTER_LIBRARIES}
${CLUTTERGTK_LIBRARIES})
${CLUTTERGTK_LIBRARIES}
-lpthread
-lrt
)
ELSE()
TARGET_LINK_LIBRARIES(ring-gnome
${LIB_RING_CLIENT_LIBRARY}
${GTK3_LIBRARIES}
${Qt5Core_LIBRARIES}
${CLUTTER_LIBRARIES}
${CLUTTERGTK_LIBRARIES}
)
ENDIF()
INSTALL(TARGETS ring-gnome
RUNTIME DESTINATION bin
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment