mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
Added compile target for dummy python module
Mostly used to check compilation and for Clangd LSP.
This commit is contained in:
parent
ff0cffc590
commit
67c511edba
@ -884,3 +884,9 @@ install(
|
|||||||
NAMELINK_COMPONENT Development
|
NAMELINK_COMPONENT Development
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(DUMMY_PYTHON "Build dummy python module used for compile check and Clangd" OFF)
|
||||||
|
if(${DUMMY_PYTHON})
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
add_subdirectory("./python")
|
||||||
|
endif()
|
||||||
|
33
python/CMakeLists.txt
Normal file
33
python/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_search_module(PYTHON3 REQUIRED python3)
|
||||||
|
|
||||||
|
set(NOTCURSES_PYTHON_SRC
|
||||||
|
notcurses/context.c
|
||||||
|
notcurses/misc.c
|
||||||
|
notcurses/channels.c
|
||||||
|
notcurses/main.c
|
||||||
|
notcurses/notcurses-python.h
|
||||||
|
notcurses/plane.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(
|
||||||
|
dummy_python MODULE
|
||||||
|
${NOTCURSES_PYTHON_SRC}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(
|
||||||
|
dummy_python
|
||||||
|
PRIVATE ${PYTHON3_INCLUDE_DIRS}
|
||||||
|
PRIVATE "${PROJECT_SOURCE_DIR}/include"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
dummy_python
|
||||||
|
PRIVATE
|
||||||
|
notcurses
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(
|
||||||
|
dummy_python
|
||||||
|
PRIVATE -Wall -Wextra
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user