Skip to content

Commit 6a19001

Browse files
committed
Build tool now respects the pkgconf variable when installing the framework
1 parent 5cd2251 commit 6a19001

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Framework/cmake/SetupCompilation.cmake

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ option(UIMGUI_INSTALL "Installs all libraries" OFF)
77
option(BUILD_VARIANT_STATIC "Builds the Framework, application library(exists only on Unix) and executable into a single
88
executable binary" OFF)
99

10-
if (UIMGUI_USE_PKGCONF_FOR_INSTALL)
10+
11+
set(UIMGUI_SRC_PREFIX "${CMAKE_SOURCE_DIR}")
12+
if (UIMGUI_USE_PKGCONF_FOR_INSTALL AND UIMGUI_INSTALL_FRAMEWORK)
1113
find_package(PkgConfig)
1214

1315
if (PKG_CONFIG_FOUND)
14-
pkg_check_modules(UntitledImGuiFramework REQUIRED UntitledImGuiFramework)
15-
link_directories("${UntitledImGuiFramework_LIBRARY_DIRS}")
16-
include_directories("${UntitledImGuiFramework_INCLUDE_DIRS}")
17-
18-
else()
19-
set(UIMGUI_SRC_PREFIX "${CMAKE_SOURCE_DIR}")
16+
pkg_check_modules(UntitledImGuiFramework UntitledImGuiFramework)
17+
if (UntitledImGuiFramework_FOUND)
18+
pkg_get_variable(UIMGUI_SRC_PREFIX UntitledImGuiFramework "includedir")
19+
link_directories("${UntitledImGuiFramework_LIBRARY_DIRS}")
20+
include_directories("${UntitledImGuiFramework_INCLUDE_DIRS}")
21+
endif ()
2022
endif()
21-
else()
22-
set(UIMGUI_SRC_PREFIX "${CMAKE_SOURCE_DIR}")
23-
endif ()
23+
endif()
2424

2525
if (EMSCRIPTEN)
2626
option(USE_HTML_GENERATION "Automatically generate HTML" ON)

0 commit comments

Comments
 (0)