mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
build: Use custom jthread implementation if standard one is not available
This commit is contained in:
6
lib/external/jthread/CMakeLists.txt
vendored
Normal file
6
lib/external/jthread/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(jthread)
|
||||
|
||||
add_library(jthread INTERFACE)
|
||||
target_include_directories(jthread INTERFACE includes)
|
||||
7
lib/external/jthread/includes/jthread.hpp
vendored
Normal file
7
lib/external/jthread/includes/jthread.hpp
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#if __has_include(<jthread>)
|
||||
#include <jthread>
|
||||
#else
|
||||
#include "../jthread/source/jthread.hpp"
|
||||
#endif
|
||||
1
lib/external/jthread/jthread
vendored
Submodule
1
lib/external/jthread/jthread
vendored
Submodule
Submodule lib/external/jthread/jthread added at 0fa8d39425
@@ -95,7 +95,7 @@ elseif (APPLE)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(libimhex PRIVATE ${FMT_LIBRARIES})
|
||||
target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} plcli libpl libpl-gen ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net libwolv-containers)
|
||||
target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} plcli libpl libpl-gen ${MINIAUDIO_LIBRARIES} ${JTHREAD_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net libwolv-containers)
|
||||
|
||||
set_property(TARGET libimhex PROPERTY INTERPROCEDURAL_OPTIMIZATION FALSE)
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#if defined(OS_WEB)
|
||||
#include <jthread.hpp>
|
||||
#endif
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
#include <list>
|
||||
#include <condition_variable>
|
||||
|
||||
#if defined(OS_WEB)
|
||||
#include <jthread.hpp>
|
||||
#endif
|
||||
|
||||
namespace hex {
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
#include <filesystem>
|
||||
#include <thread>
|
||||
#include <jthread.hpp>
|
||||
|
||||
#if defined(OS_WEB)
|
||||
#include <jthread.hpp>
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user