Skip to content

Commit

Permalink
fix homebrew paths in build script and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
SHildebrandt committed Jan 4, 2024
1 parent 65941a3 commit d1e96c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/sharp_sat_ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
println!("cargo:rustc-link-search={}", build_dst.join("build").display());
println!("cargo:rustc-link-lib=static={lib_name}");
if os == "macos" && arch == "aarch64" {
println!("cargo:rustc-link-search=/opt/homebrew/include/Cellar/gmp/6.3.0/include");
println!("cargo:rustc-link-search=/opt/homebrew/Cellar/gmp/6.3.0/include");
}

//Link other stuff
Expand Down
6 changes: 3 additions & 3 deletions lib/sharp_sat_ffi/sharp_sat_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ endif ()
IF(UNIX)
IF(APPLE)
IF(CMAKE_APPLE_SILICON_PROCESSOR)
include_directories(/opt/homebrew/include/Cellar/gmp/6.3.0/include)
include_directories(/opt/homebrew/Cellar/gmp/6.3.0/include)
ELSE(CMAKE_APPLE_SILICON_PROCESSOR)
include_directories(/usr/local/Cellar/gmp/6.3.0/include)
ENDIF(CMAKE_APPLE_SILICON_PROCESSOR)
ELSE(APPLE)

ENDIF(APPLE)
ELSE(UNIX)

Expand All @@ -31,4 +31,4 @@ add_library(sharp_sat_wrapper library.cpp include/library.h)
target_link_libraries(sharp_sat_wrapper ${CMAKE_SOURCE_DIR}/../sharp_sat/sharpSAT/build/lib_sharp_sat.a ${GMP_LIB} ${GMPXX_LIB})

add_executable(sharp_sat_test main.cpp)
target_link_libraries(sharp_sat_test sharp_sat_wrapper ${CMAKE_SOURCE_DIR}/../sharp_sat/sharpSAT/build/lib_sharp_sat.a ${GMP_LIB} ${GMPXX_LIB})
target_link_libraries(sharp_sat_test sharp_sat_wrapper ${CMAKE_SOURCE_DIR}/../sharp_sat/sharpSAT/build/lib_sharp_sat.a ${GMP_LIB} ${GMPXX_LIB})

0 comments on commit d1e96c1

Please sign in to comment.