Skip to content

Commit

Permalink
cmake for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yudhastyawan committed Oct 25, 2021
1 parent 46d9cb8 commit 5ddb754
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/
build/

# -- end of user ---

Expand Down
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ target_link_libraries(agv PUBLIC ${GTK_LIBRARIES})

find_package(PythonLibs)


find_package(SWIG)
include(UseSWIG)

Expand All @@ -65,6 +64,23 @@ target_link_directories(angkapy
${PYTHON_LIBRARY_PATH}
)

if(WIN32)
set(SWIG_WIN_INCLUDE_DIRECTORIES C:/msys64/usr/share/swig/4.0.2)
set(Python_NumPy_INCLUDE_DIR C:/ProgramData/Miniconda3/Lib/site-packages/numpy/core/include)
set(Python_NumPy_LINK_DIR C:/ProgramData/Miniconda3/Lib/site-packages/numpy/core/lib)
target_include_directories(angkapy
PUBLIC
${SWIG_WIN_INCLUDE_DIRECTORIES}
${SWIG_WIN_INCLUDE_DIRECTORIES}/python
${Python_NumPy_INCLUDE_DIR})
target_link_directories(angkapy
PUBLIC
${Python_NumPy_LINK_DIR})
target_link_libraries(angkapy
PUBLIC
npymath)
endif()

target_link_libraries(angkapy
PUBLIC
agx
Expand Down

0 comments on commit 5ddb754

Please sign in to comment.