diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 000000000..ef2328afc --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,44 @@ +name: build-linux + +on: + push: + pull_request: + +env: + BUILD_TYPE: Release + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y build-essential \ + gcc-10 \ + g++-10 \ + pkg-config \ + cmake \ + make \ + libglfw3-dev \ + libglm-dev \ + libmagic-dev \ + libssl-dev \ + libcapstone-dev \ + llvm-dev \ + nlohmann-json3-dev \ + python3-dev \ + + - name: Build + shell: bash + run: | + mkdir build + cd build + CC=gcc-10 CXX=g++-10 cmake .. + make -j 4 diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index 4a62d0676..399479ac7 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -2,9 +2,11 @@ name: build-win on: push: - branches: [ master ] pull_request: +env: + BUILD_TYPE: Release + jobs: build: runs-on: windows-latest @@ -17,23 +19,22 @@ jobs: #{ msystem: MINGW32, arch: i686 } ] steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - name: Setup + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + install: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-capstone mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-llvm mingw-w64-${{ matrix.arch }}-nlohmann-json mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-python + update: true - - name: Build - uses: msys2/setup-msys2@v2 - with: - msystem: ${{ matrix.msystem }} - install: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-capstone mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-llvm mingw-w64-${{ matrix.arch }}-nlohmann-json mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-python - update: true - - - name: Build - shell: msys2 {0} - run: | - mkdir build - cd build - cmake -G "MinGW Makefiles" .. - mingw32-make -j 4 + - name: Build + shell: msys2 {0} + run: | + mkdir build + cd build + cmake -G "MinGW Makefiles" .. + mingw32-make -j 4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b6ed7111..d255ead40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,12 @@ cmake_minimum_required(VERSION 3.16) project(HexEditor) +SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL) +SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC) + set(CMAKE_CXX_STANDARD 20) + find_package(PkgConfig REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) pkg_search_module(GLM REQUIRED glm)