Skip to content

Commit

Permalink
Add option to build and install extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmirabel committed Feb 7, 2018
1 parent 6066a76 commit bee026b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ install(TARGETS PythonQt
install(FILES ${headers} DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR})
install(FILES ${headers_gui} DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR}/gui)

add_subdirectory(extensions)
#-----------------------------------------------------------------------------
# Testing

Expand Down
23 changes: 23 additions & 0 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
option(PythonQt_Extensions "Build PythonQt extensions." OFF)

if(PythonQt_Extensions)
if(NOT PythonQt_Wrap_QtAll)
MESSAGE(FATAL_ERROR "Cannot build PythonQt_QtAll without PythonQt_Wrap_QtAll set to ON")
endif(NOT PythonQt_Wrap_QtAll)
set(qtall_headers
PythonQt_QtAll/PythonQt_QtAll.h)

set(qtall_sources
PythonQt_QtAll/PythonQt_QtAll.cpp)

include_directories(generated_cpp${generated_cpp_suffix})

add_library(PythonQt_QtAll SHARED ${qtall_sources})
target_link_libraries(PythonQt_QtAll PythonQt)

install(TARGETS PythonQt_QtAll
RUNTIME DESTINATION ${PythonQt_INSTALL_RUNTIME_DIR}
LIBRARY DESTINATION ${PythonQt_INSTALL_LIBRARY_DIR}
ARCHIVE DESTINATION ${PythonQt_INSTALL_ARCHIVE_DIR})
install(FILES ${qtall_headers} DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR})
endif()

0 comments on commit bee026b

Please sign in to comment.