Skip to content

Commit

Permalink
Update for new open module
Browse files Browse the repository at this point in the history
  • Loading branch information
Madman10K committed Sep 5, 2023
1 parent 1f388f6 commit 46436a7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ option(USE_OS_MODULE "Use the operating system module" ON)
if (USE_OS_MODULE)
option(ENABLE_UEXEC "Compile in the UntitledExec library for a cross-platform method of launching applications" OFF)
option(ENABLE_UFONT_UTILS "Compiles in cross-platform utilities for dealing with system fonts" ON)
option(ENABLE_UOPEN "Enables the UntitledOpen library, that opens URLs and files with a default application" OFF)

if (NOT WIN32)
option(ENABLE_XDG_BASEDIR "Compile in the UntitledXDGBasedir library for a XDG Basedir implementation" OFF)
Expand Down Expand Up @@ -161,6 +162,23 @@ if (USE_OS_MODULE)
endif()
endif()

if (ENABLE_UOPEN)
if (BUILD_VARIANT_VENDOR)
include_directories("Framework/Modules/OS/ThirdParty/" "Framework/Modules/OS/ThirdParty/UntitledOpen")
add_subdirectory(Framework/Modules/OS/ThirdParty/UntitledOpen)
list(APPEND ENABLED_LIBRARIES UntitledOpen)
else ()
find_package(PkgConfig REQUIRED)
pkg_check_modules(UntitledOpen REQUIRED UntitledOpen)

link_directories(${UntitledOpen_LIBRARY_DIRS})
list(APPEND LM_INCLUDE_DIRS ${UntitledOpen_INCLUDE_DIRS})
list(APPEND ENABLED_LIBRARIES UntitledOpen)
pkg_get_variable(UEXEC_COMPILE_DEFS UntitledOpen compile_defs)
list(APPEND VENDOR_COMPILE_DEFS ${UntitledOpen_COMPILE_DEFS})
endif ()
endif()

if (ENABLE_UEXEC)
if (BUILD_VARIANT_VENDOR)
include_directories("Framework/Modules/OS/ThirdParty/" "Framework/Modules/OS/ThirdParty/uexec")
Expand Down Expand Up @@ -439,6 +457,9 @@ if (USE_OS_MODULE)
if (ENABLE_UFONT_UTILS)
enable_module_defs(UIMGUI_UFONT_UTILS_SUBMODULE_ENABLED)
endif()
if (ENABLE_UOPEN)
enable_module_defs(UIMGUI_OPEN_SUBMODULE_ENABLED)
endif ()
endif()
if (BUILD_MODE_VENDOR)
foreach(f IN ITEMS ${ENABLED_LIBRARIES})
Expand Down

0 comments on commit 46436a7

Please sign in to comment.