Skip to content

Commit b0ee38b

Browse files
committed
Added nativefiledialog-extended
1 parent 3af0e9f commit b0ee38b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+160
-167
lines changed

CMakeLists.txt

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ add_subdirectory(external/ADFlib)
2626
add_subdirectory(external/dear_imgui)
2727
add_subdirectory(external/EASTL)
2828
add_subdirectory(external/capstone)
29-
add_subdirectory(external/nativefiledialog)
29+
add_subdirectory(external/nativefiledialog-extended) #nfd
3030
add_subdirectory(libs/qd)
3131
add_subdirectory(libs/amDebugger)
3232
add_subdirectory(libs/exprParser)
@@ -41,28 +41,31 @@ file(GLOB_RECURSE QUAESAR_SOURCES "src/*.cpp")
4141
file(GLOB_RECURSE QUAESAR_HEADERS "src/*.h")
4242

4343
#-------------------------------------------------------------------------------
44-
# Run simple cmake converter to put font files into the data segment
45-
# Glob up resource files
44+
# Run CMake converter to put images into the data segment
4645
file(GLOB resources "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.*")
47-
4846
# Concatenate resource files into a comma separated string
4947
string (REGEX REPLACE "([^\\]|^);" "\\1," resources_string "${resources}")
5048
string (REGEX REPLACE "[\\](.)" "\\1" resources_string "${resources_string}")
51-
5249
# Create command line for running bin2c cmake script
5350
set(bin2c_cmdline
54-
-DOUTPUT_C=resources_inc.cpp
55-
-DOUTPUT_H=resources_inc.h
51+
-DOUTPUT_C=resources_inc.cpp -DOUTPUT_H=resources_inc.h
5652
"-DINPUT_FILES=${resources_string}"
5753
-P "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/bin2c.cmake")
5854

59-
# Run bin2c on resource files
60-
add_custom_command(
61-
OUTPUT resources_inc.cpp resources_inc.h
62-
COMMAND ${CMAKE_COMMAND} ARGS ${bin2c_cmdline}
63-
DEPENDS ${resources}
64-
COMMENT "Running bin2c"
65-
VERBATIM)
55+
# Run bin2c immediately at configure time
56+
message(STATUS "Running bin2c (configure-time)...('${CMAKE_COMMAND} ${bin2c_cmdline}')")
57+
execute_process(
58+
COMMAND ${CMAKE_COMMAND} ${bin2c_cmdline}
59+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
60+
RESULT_VARIABLE bin2c_result
61+
OUTPUT_VARIABLE bin2c_stdout
62+
ERROR_VARIABLE bin2c_stderr
63+
OUTPUT_STRIP_TRAILING_WHITESPACE
64+
ERROR_STRIP_TRAILING_WHITESPACE
65+
)
66+
if (NOT bin2c_result EQUAL 0)
67+
message(FATAL_ERROR "bin2c failed (exit ${bin2c_result})\nstdout:\n${bin2c_stdout}\nstderr:\n${bin2c_stderr}")
68+
endif()
6669

6770
# Create a custom target for nanogui_resources
6871
add_custom_target(incbin_resources DEPENDS resources_inc.cpp resources_inc.h)

external/EASTL/include/EASTL/unique_ptr.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,12 @@ namespace eastl
558558
/// hash specialization for unique_ptr.
559559
/// It simply returns eastl::hash(x.get()). If your unique_ptr pointer type (the return value of unique_ptr<T>::get) is
560560
/// a custom type and not a built-in pointer type then you will need to independently define eastl::hash for that type.
561-
template <typename T, typename D>
562-
struct hash< unique_ptr<T, D> >
563-
{
564-
size_t operator()(const unique_ptr<T, D>& x) const EA_NOEXCEPT
565-
{ return eastl::hash<typename unique_ptr<T, D>::pointer>()(x.get()); }
566-
};
561+
template <typename T, typename D>
562+
struct hash<unique_ptr<T, D>> {
563+
size_t operator()(const unique_ptr<T, D>& x) const EA_NOEXCEPT {
564+
return eastl::hash<typename unique_ptr<T, D>::pointer>()(x.get());
565+
}
566+
};
567567

568568
/// swap
569569
/// Exchanges the owned pointer beween two unique_ptr objects.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)