Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RapidJSON dependency in Meson BuildSystem #70

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ ifneq ($(COMPILER),clang)
NO_POINTER_SIGN =
NO_CLOBBERED = -Wno-clobbered
NO_SUGGEST_ATTRIBUTE_FORMAT = -Wno-suggest-attribute=format
MCPU_OPT = -mcpu=native
else
NO_MAYBE_UNINITIALIZED =
NO_OLD_STYLE_DECLARATION =
Expand All @@ -71,16 +70,15 @@ else
NO_POINTER_SIGN = -Wno-pointer-sign
NO_CLOBBERED =
NO_SUGGEST_ATTRIBUTE_FORMAT =
MCPU_OPT =
endif

# Investigate: Improving C++ Builds with Split DWARF
# http://www.productive-cpp.com/improving-cpp-builds-with-split-dwarf/

CFLAGS = $(WARNINGS) $(MCPU_OPT) -mtune=native -fno-exceptions -gdwarf-4 -g2 -ggnu-pubnames -gsplit-dwarf $(SDL2FLAGS) $(GTK3FLAGS) $(I915_PERF_CFLAGS) -I/usr/include/freetype2
CFLAGS = $(WARNINGS) -fno-exceptions -gdwarf-4 -g2 -ggnu-pubnames -gsplit-dwarf $(SDL2FLAGS) $(GTK3FLAGS) $(I915_PERF_CFLAGS) -I/usr/include/freetype2
CFLAGS += -DUSE_FREETYPE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64
CXXFLAGS = -fno-rtti -Woverloaded-virtual $(CXXWARNINGS)
LDFLAGS = $(MCPU_OPT) -mtune=native -gdwarf-4 -g2 -Wl,--build-id=sha1
LDFLAGS = -gdwarf-4 -g2 -Wl,--build-id=sha1
LIBS = -Wl,--no-as-needed -lm -ldl -lpthread -lfreetype -lstdc++ $(SDL2LIBS) $(I915_PERF_LIBS)

ifneq ("$(wildcard /usr/bin/ld.gold)","")
Expand Down
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if get_option('use_i915_perf')
all_deps += dependency('i915-perf')
endif

if get_option('have_rapidjson')
compile_flags += '-DHAVE_RAPIDJSON=1'
all_deps += dependency('RapidJSON')
endif

gpuvis_files = files(
'src/gpuvis.cpp',
'src/gpuvis_graph.cpp',
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
option('use_freetype', type : 'boolean', value : 'true')
option('use_gtk3', type : 'boolean', value : 'true')
option('use_i915_perf', type : 'boolean', value : 'false')
option('have_rapidjson', type : 'boolean', value : 'true')