Skip to content

Commit

Permalink
Attempt to fix macos linking issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Sep 28, 2024
1 parent 4f893b6 commit d79209b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: Linux

on: [release]
on: [push]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: macOS

on: [release]
on: [push]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: Windows 11

on: [push]
on: [release]

# on:
# release:
Expand Down
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,15 @@ print_header("Configuring Python")
include(GNUInstallDirs)

set(Python_POSTFIX "3")
if(WIN32)
# No amount of fiddling seems to convince cmake to use the MSYS2 python
# instead of whatever other nonsense is installed on github runners.
# So we force it to an exact version which is not available except in
# the MSYS2 environment. Sue me.
find_package(Python 3.11.10 EXACT REQUIRED COMPONENTS Interpreter Development)
else()
#if(WIN32)
# # No amount of fiddling seems to convince cmake to use the MSYS2 python
# # instead of whatever other nonsense is installed on github runners.
# # So we force it to an exact version which is not available except in
# # the MSYS2 environment. Sue me.
# find_package(Python 3.11.10 EXACT REQUIRED COMPONENTS Interpreter Development)
#else()
find_package(Python REQUIRED COMPONENTS Interpreter Development)
endif()
#endif()
find_package(pybind11 CONFIG)
if (NOT pybind11_FOUND)
message(STATUS "Using included pybind11.")
Expand Down
4 changes: 3 additions & 1 deletion core/packages/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ foreach(PACKAGE ${PACKAGES})
)
endforeach()

find_package(GMPXX REQUIRED STATIC)

foreach(PACKAGE ${COMPILED_PACKAGES})
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
Expand All @@ -71,7 +73,7 @@ foreach(PACKAGE ${COMPILED_PACKAGES})
set_target_properties(${PNAME} PROPERTIES SUFFIX ".${Python_MOD_SUFFIX}")
set_target_properties(${PNAME} PROPERTIES INSTALL_RPATH "$ORIGIN/../../:$ORIGIN/../../../../")

target_link_libraries(${PNAME} PUBLIC cadabra2 ${GMPXX_LIBRARIES})
target_link_libraries(${PNAME} PUBLIC cadabra2 ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
target_include_directories(${PNAME} PUBLIC ${CADABRA_CORE_DIR})

if(IPO_SUPPORTED)
Expand Down
9 changes: 9 additions & 0 deletions frontend/gtkmm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ endif()
pkg_check_modules(CairoMM REQUIRED IMPORTED_TARGET cairomm-1.0)
pkg_check_modules(PangoMM REQUIRED IMPORTED_TARGET pangomm-1.4)

target_compile_options(
cadabra2-gtk
PUBLIC
${Boost_CFLAGS_OTHER}
${GLIBMM_CFLAGS_OTHER}
${GTKMM3_CFLAGS_OTHER}
${SQLITE3_CFLAGS_OTHER}
${Fontconfig_CFLAGS_OTHER}
)
target_link_libraries(
cadabra2-gtk
PUBLIC
Expand Down

0 comments on commit d79209b

Please sign in to comment.