Skip to content

Commit

Permalink
Build procedure migrated to Conan 2.*
Browse files Browse the repository at this point in the history
  • Loading branch information
tyoma committed Jan 20, 2025
1 parent 83174b9 commit b161285
Show file tree
Hide file tree
Showing 9 changed files with 709 additions and 1,058 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
config:
- os: ubuntu-22.04
- os: windows-2019
- os: macos-12
- os: macos-13

steps:
- uses: actions/checkout@v2
Expand All @@ -33,11 +33,9 @@ jobs:
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0

- name: Configure CMake
run: cmake -B ${{github.workspace}}/_build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/_build -S ${{github.workspace}} -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${{github.workspace}}/build.props/conan_provider.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/_build --config ${{env.BUILD_TYPE}} --parallel 4
Expand Down
1,026 changes: 0 additions & 1,026 deletions build.props/conan.cmake

This file was deleted.

676 changes: 676 additions & 0 deletions build.props/conan_provider.cmake

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions build.props/freetype2.include.cmake

This file was deleted.

8 changes: 0 additions & 8 deletions build.props/sqlite3.include.cmake

This file was deleted.

26 changes: 26 additions & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[requires]
capstone/4.0.2
freetype/2.12.1
sqlite3/3.40.0

[options]
freetype/*:shared=False
freetype/*:with_brotli=False
freetype/*:withbzip2=False
freetype/*:with_png=False
freetype/*:with_zlib=False

sqlite3/*:shared=False
sqlite3/*:build_executable=False
sqlite3/*:threadsafe=2

capstone/*:arm=False
capstone/*:evm=False
capstone/*:m680x=False
capstone/*:m68k=False
capstone/*:mips=False
capstone/*:ppc=False
capstone/*:sparc=False
capstone/*:sysz=False
capstone/*:tms320c64x=False
capstone/*:xcore=False
11 changes: 2 additions & 9 deletions patcher/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ cmake_minimum_required(VERSION 3.13)

include(asm)

include(conan)

conan_cmake_run(REQUIRES capstone/4.0.2
BUILD missing
BASIC_SETUP
CMAKE_TARGETS
ARCH ${MP_TARGET_ARCH}
OPTIONS capstone:arm=False;capstone:evm=False;capstone:m680x=False;capstone:m68k=False;capstone:mips=False;capstone:ppc=False;capstone:sparc=False;capstone:sysz=False;capstone:tms320c64x=False;capstone:xcore=False;)
find_package(capstone REQUIRED)

set(PATCHER_SOURCES
dynamic_hooking.cpp
Expand All @@ -24,5 +17,5 @@ set(PATCHER_SOURCES
)

add_library(patcher STATIC ${PATCHER_SOURCES})
target_link_libraries(patcher CONAN_PKG::capstone mt)
target_link_libraries(patcher capstone::capstone mt)
target_compile_definitions(patcher PUBLIC SDB_NO_SIGNALS)
4 changes: 2 additions & 2 deletions sqlite++/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13)

include(sqlite3.include)
find_package(SQLite3 REQUIRED)

add_library(sqlite++ INTERFACE)
target_link_libraries(sqlite++ INTERFACE CONAN_PKG::sqlite3)
target_link_libraries(sqlite++ INTERFACE SQLite::SQLite3)

0 comments on commit b161285

Please sign in to comment.