Skip to content

Commit

Permalink
putting python into its own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Mar 21, 2024
1 parent 6b13173 commit b6b5700
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
29 changes: 4 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,28 +98,7 @@ if(MUSICA_BUILD_FORTRAN_INTERFACE)
endif()

################################################################################
# MUSICA
if(MUSICA_BUILD_C_CXX_INTERFACE)
add_subdirectory(src)
endif()

################################################################################
# MUSICA-Fortran
if(MUSICA_BUILD_FORTRAN_INTERFACE)
add_subdirectory(fortran)
endif()




project(micm)
pybind11_add_module(micm src/micm/wrapper.cpp)

target_include_directories(micm
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/lib/micm/include>
$<INSTALL_INTERFACE:${MUSICA_INSTALL_INCLUDE_DIR}>
)

target_link_libraries(micm PUBLIC musica)

# Musica python
if(MUSICA_ENABLE_PYTHON_LIBRARY)
add_subdirectory(python)
endif()
10 changes: 10 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
project(musica-python)
pybind11_add_module(musica-python ../src/micm/wrapper.cpp)

target_include_directories(musica-python
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/lib/micm/include>
$<INSTALL_INTERFACE:${MUSICA_INSTALL_INCLUDE_DIR}>
)

target_link_libraries(musica-python PUBLIC musica)

0 comments on commit b6b5700

Please sign in to comment.