Skip to content

Commit

Permalink
Fix compilation (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelatihy authored Dec 31, 2020
1 parent a7e22a1 commit 0624923
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: install macos dependencies
run: |
brew update
brew install ninja embree
- uses: actions/checkout@v2
# - name: install macos dependencies
# run: |
# brew update
# brew install ninja embree
- name: configure
run: |
mkdir build
cd build
cmake .. -GNinja -DYOCTO_OPENGL=ON -DYOCTO_EMBREE=ON
cmake .. -G"Unix Makefiles" -DYOCTO_OPENGL=ON -DYOCTO_EMBREE=OFF
- name: build
run: |
cd build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install ubuntu dependencies
run: |
sudo apt-get update --yes
sudo apt-get install --yes ninja-build
- uses: actions/checkout@v2
# - name: install ubuntu dependencies
# run: |
# sudo apt-get update --yes
# sudo apt-get install --yes ninja-build
- name: configure
env:
CC: gcc-8
CXX: g++-8
run: |
mkdir build
cd build
cmake .. -GNinja -DYOCTO_OPENGL=OFF -DYOCTO_EMBREE=OFF
cmake .. -G"Unix Makefiles" -DYOCTO_OPENGL=OFF -DYOCTO_EMBREE=OFF
- name: build
run: |
cd build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
choco update
choco install ninja
- uses: actions/checkout@v2
# - name: install dependencies
# run: |
# choco update
# choco install ninja
- name: configure
run: |
mkdir build
Expand Down
10 changes: 7 additions & 3 deletions libs/yocto_gui/yocto_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,9 @@ void draw_log(gui_window* win) {
template <typename T>
static bool draw_number_param(
gui_window* win, const char* lbl, json_value& value, bool readonly) {
auto gvalue = value.get<T>();
// This should work but breaks on windows
// auto gvalue = value.get<T>();
auto gvalue = from_json<T>(value); // windows fix
if (draw_dragger(win, lbl, gvalue) && !readonly) {
value = gvalue;
return true;
Expand Down Expand Up @@ -999,8 +1001,10 @@ static bool draw_string_param(

static bool draw_enum_param(gui_window* win, const char* lbl, json_value& value,
bool readonly, const json_value& labels) {
auto gvalue = value.get<string>();
auto glabels = labels.get<vector<string>>();
auto gvalue = value.get<string>();
// this code should work by break windows
// auto glabels = labels.get<vector<string>>();
auto glabels = from_json<vector<string>>(labels); // windows fix
if (draw_combobox(win, lbl, gvalue, glabels) && !readonly) {
value = gvalue;
return true;
Expand Down

0 comments on commit 0624923

Please sign in to comment.