Skip to content

Commit

Permalink
fix broken build and clean up dist files
Browse files Browse the repository at this point in the history
see issue for what may be a bug in scikit-build-core:
scikit-build/scikit-build-core#914
  • Loading branch information
andrewprock committed Sep 27, 2024
1 parent d67da05 commit f31774b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*~
build
_build
dist
*.pyc
*.vscode
Expand Down
30 changes: 17 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
# Set up gtest. This must be set up before any subdirectories are
# added which will use gtest.
# TODO: clean this up a bit, maybe make this optional?
add_subdirectory(src/ext/googletest)
include_directories(${GTEST_INCLUDE_DIRS})
link_directories(${GTEST_LIBS_DIR})
add_definitions("-fPIC")
Expand All @@ -36,19 +35,24 @@ include_directories("${PROJECT_BINARY_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

# This controls whether or not to build the python bridge
if(BUILD_PYTHON)
add_subdirectory(src/lib/python)
endif()

# add the actual code
include_directories(src/lib)
add_subdirectory(src/lib)
add_subdirectory(src/programs)

# Add make install functionality
#install(TARGETS peval)
#install(TARGETS penum)
#install(TARGETS ps-colex)
#install(TARGETS ps-eval)
#install(TARGETS ps-lut)

# This controls whether or not we are building the python
# binaries, and possibly the wheel file.
# TODO: add a separate option for building the wheel vs. python
if(BUILD_PYTHON)
add_subdirectory(src/lib/python)
else()
# none of these are needed in the wheel file
add_subdirectory(src/programs)
add_subdirectory(src/ext/googletest)
# Add make install functionality
install(TARGETS peval)
install(TARGETS penum)
install(TARGETS ps-colex)
install(TARGETS ps-eval)
install(TARGETS ps-lut)
endif()
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cmake.version = ">=3.5"
cmake.build-type = "Release"
build.targets = ["pokerstove"]
install.components = ["pokerstove"]
sdist.exclude = ["src/programs", "android", "win32", "src/ext", "doc", ".*"]
# build.verbose = true
# logging.level = "DEBUG"

Expand Down

0 comments on commit f31774b

Please sign in to comment.