Skip to content

Commit

Permalink
Set CMAKE_OUTPUT_DIRECTORY for windows build (#41)
Browse files Browse the repository at this point in the history
* check windows

* add library

* add debug log

* try to fix

* try to fix2

* try to fix 3

* try to fix 4

* fix 5

* rest test number

* fix setup.py

* remove log
  • Loading branch information
pantor authored Jun 25, 2021
1 parent 77f6a5c commit 36dca69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
buildDirectory: "${{ github.workspace }}/build"
cmakeBuildType: 'Release'
cmakeAppendedArgs: '-DBUILD_PYTHON_MODULE=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARK=ON'
cmakeAppendedArgs: '-DBUILD_PYTHON_MODULE=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARK=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=. -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG=.'

- name: Run Examples (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Run Examples (Windows)
if: matrix.os == 'windows-latest'
run: |
.\build\Debug\example-position.exe > $null
.\build\example-position.exe > $null
python3 .\examples\position.py > $null
- name: Test
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ if(BUILD_PYTHON_MODULE)

set_target_properties(python_ruckig PROPERTIES OUTPUT_NAME ruckig)
set_target_properties(python_ruckig PROPERTIES ARCHIVE_OUTPUT_NAME python_ruckig)
set_target_properties(python_ruckig PROPERTIES LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>)
endif()


Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
recursive-include cmake *
recursive-include include *
recursive-include src *
recursive-include test *
recursive-include examples *

include CMakeLists.txt
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ def build_extension(self, ext):

cmake_args = [
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
'-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=' + extdir,
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=' + extdir,
'-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=' + extdir,
'-DPYTHON_EXECUTABLE={}'.format(sys.executable),
'-DEXAMPLE_VERSION_INFO={}'.format(self.distribution.get_version()),
'-DCMAKE_BUILD_TYPE=' + build_type,
'-DBUILD_PYTHON_MODULE=ON',
'-DBUILD_EXAMPLES=OFF',
'-DBUILD_TESTS=OFF',
'-DBUILD_SHARED_LIBS=OFF',
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
]
Expand Down

0 comments on commit 36dca69

Please sign in to comment.