[regression] Fixed GTK3 detection

pull/983/head
nightwalker-87 2020-06-04 21:33:34 +02:00
rodzic 8f42f54438
commit 05f79e1cdf
3 zmienionych plików z 6 dodań i 10 usunięć

Wyświetl plik

@ -140,7 +140,7 @@ endif ()
set(STLINK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Main library install directory")
# Set the environment variable LD_LIBRARY_PATH to point to /usr/local/lib (per default).
execute_process (COMMAND bash -c "export LD_LIBRARY_PATH="${CMAKE_INSTALL_LIBDIR}" ")
execute_process (COMMAND bash -c "export LD_LIBRARY_PATH=${CMAKE_INSTALL_LIBDIR}")
###

Wyświetl plik

@ -8,14 +8,9 @@ In order to use pkg-config for development purposes, add the following lines to
## Package configuration (pkg-config) on unix-based systems
if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
add_subdirectory(doc/dev/pkg-config) # Option A: external tool pkg-config
find_package(PkgConfig) # Option B: internal cmake module for pkg-config integration
pkg_check_modules(GTK3 gtk+-3.0)
add_subdirectory(doc/dev/pkg-config) # external tool pkg-config
endif ()
ToDo: Check for compatibility issues between options A and B.
=== Target Identification ===
The following information is available about the target:

Wyświetl plik

@ -2,7 +2,10 @@
# Build GUI
###
if (NOT WIN32)
if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
find_package(PkgConfig)
pkg_check_modules(GTK3 gtk+-3.0)
## GUI-Building requires the presence of a GTK3 toolset
if (NOT GTK3_FOUND)
message(STATUS "GTK3 not found!")
@ -35,7 +38,5 @@ if (NOT WIN32)
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_INSTALL_PREFIX}/bin")
target_link_libraries(stlink-gui ${STLINK_LIB_SHARED} ${SSP_LIB} ${GTK3_LDFLAGS})
install(TARGETS stlink-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
endif ()
endif ()