Skip to content

Commit bee026b

Browse files
committed
Add option to build and install extensions.
1 parent 6066a76 commit bee026b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ install(TARGETS PythonQt
360360
install(FILES ${headers} DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR})
361361
install(FILES ${headers_gui} DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR}/gui)
362362

363+
add_subdirectory(extensions)
363364
#-----------------------------------------------------------------------------
364365
# Testing
365366

extensions/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
option(PythonQt_Extensions "Build PythonQt extensions." OFF)
2+
3+
if(PythonQt_Extensions)
4+
if(NOT PythonQt_Wrap_QtAll)
5+
MESSAGE(FATAL_ERROR "Cannot build PythonQt_QtAll without PythonQt_Wrap_QtAll set to ON")
6+
endif(NOT PythonQt_Wrap_QtAll)
7+
set(qtall_headers
8+
PythonQt_QtAll/PythonQt_QtAll.h)
9+
10+
set(qtall_sources
11+
PythonQt_QtAll/PythonQt_QtAll.cpp)
12+
13+
include_directories(generated_cpp${generated_cpp_suffix})
14+
15+
add_library(PythonQt_QtAll SHARED ${qtall_sources})
16+
target_link_libraries(PythonQt_QtAll PythonQt)
17+
18+
install(TARGETS PythonQt_QtAll
19+
RUNTIME DESTINATION ${PythonQt_INSTALL_RUNTIME_DIR}
20+
LIBRARY DESTINATION ${PythonQt_INSTALL_LIBRARY_DIR}
21+
ARCHIVE DESTINATION ${PythonQt_INSTALL_ARCHIVE_DIR})
22+
install(FILES ${qtall_headers} DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR})
23+
endif()

0 commit comments

Comments
 (0)