Skip to content

Commit ac25cd4

Browse files
committed
cmake: add target python
1 parent 616febb commit ac25cd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ SET(PYWRAP ${PYWRAP} PARENT_SCOPE)
2323

2424
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/python/${PROJECT_NAME}")
2525

26+
ADD_CUSTOM_TARGET(python)
27+
SET_TARGET_PROPERTIES(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
28+
2629
ADD_LIBRARY(${PYWRAP} SHARED main.cpp)
30+
ADD_DEPENDENCIES(python ${PYWRAP})
2731
TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PROJECT_NAME})
2832
# BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS spews conversion warnings from int to long unsigned int.
2933
# Unfortunately, using literals does not work in a macro. As such, this turns them off for the entire wrapper:

0 commit comments

Comments
 (0)