diff options
author | Christian Tismer <ctismer@gmail.com> | 2015-09-21 11:52:00 +0200 |
---|---|---|
committer | Christian Tismer <ctismer@gmail.com> | 2015-09-21 11:52:00 +0200 |
commit | b348f2e6038ea2635938b20e99130aa7984c3da0 (patch) | |
tree | cea7eeed5c142f2c20547b1413249d068523f901 | |
parent | aec629295a7470396432cfbf8175e3020949904f (diff) |
huge change on project layout.
The intention is to have PySide2 and Shiboken2 as project names, to
allow for co-existence of PySide and PySide2.
This is the first version that builds with these settings on OS X:
$ python3 setup.py build --debug --no-examples --ignore-git --qmake=/usr/local/Cellar/qt5/5.5.0/bin/qmake --jobs=9
This is not yet tested.
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | data/CMakeLists.txt | 14 | ||||
-rw-r--r-- | data/ShibokenConfig.cmake.in | 2 | ||||
-rw-r--r-- | generator/CMakeLists.txt | 14 | ||||
-rw-r--r-- | generator/shibokenconfig.h.in | 2 | ||||
-rw-r--r-- | libshiboken/CMakeLists.txt | 10 | ||||
-rw-r--r-- | shibokenmodule/CMakeLists.txt | 8 |
7 files changed, 31 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fe3b3a..3909e67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ Include(icecc.cmake) -project(shiboken) +project(shiboken2) cmake_minimum_required(VERSION 3.0) cmake_policy(VERSION 3.0) @@ -14,10 +14,10 @@ add_definitions(${Qt5Core_DEFINITIONS}) set(shiboken_MAJOR_VERSION "2") set(shiboken_MINOR_VERSION "0") set(shiboken_MICRO_VERSION "0") -set(shiboken_VERSION "${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VERSION}.${shiboken_MICRO_VERSION}") +set(shiboken2_VERSION "${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VERSION}.${shiboken_MICRO_VERSION}") option(BUILD_TESTS "Build tests." TRUE) -option(USE_PYTHON3 "Use python3 libraries to build shiboken." FALSE) +option(USE_PYTHON3 "Use python3 libraries to build shiboken2." FALSE) if (USE_PYTHON3) find_package(Python3Libs) @@ -96,7 +96,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") message(WARNING "Python debug shared library not found; assuming python was built with shared library support disabled.") endif() if(NOT PYTHON_WITH_DEBUG) - message(WARNING "Compiling shiboken with debug enabled, but the python executable was not compiled with debug support.") + message(WARNING "Compiling shiboken2 with debug enabled, but the python executable was not compiled with debug support.") else() add_definitions("-DPy_DEBUG") set(SBK_ADD_PY_DEBUG_DEFINITION "add_definitions(\"-DPy_DEBUG\")") @@ -131,13 +131,13 @@ if (Qt5Core_FOUND AND PYTHONINTERP_FOUND) add_subdirectory(tests) endif() else() - message(WARNING "Some dependencies were not found, shiboken generator compilation disabled!") + message(WARNING "Some dependencies were not found, shiboken2 generator compilation disabled!") endif() add_subdirectory(data) # dist target -set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${shiboken_VERSION}) +set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${shiboken2_VERSION}) add_custom_target(dist COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" && git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" && diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index c40d552..29acf0c 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -5,8 +5,8 @@ else() endif() add_custom_target(data) -add_dependencies(data shiboken) -get_target_property(SHIBOKEN_GENERATOR shiboken OUTPUT_NAME) +add_dependencies(data shiboken2) +get_target_property(SHIBOKEN_GENERATOR shiboken2 OUTPUT_NAME) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfig.cmake" @ONLY) @@ -15,14 +15,14 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfig-spec.cmake.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfigVersion.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfigVersion.cmake" @ONLY) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken.pc.in" - "${CMAKE_CURRENT_BINARY_DIR}/shiboken${shiboken_SUFFIX}.pc" @ONLY) + "${CMAKE_CURRENT_BINARY_DIR}/shiboken${shiboken2_SUFFIX}.pc" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfig.cmake" - DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken-${shiboken_VERSION}") + DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfig${PYTHON_SUFFIX}.cmake" - DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken-${shiboken_VERSION}") + DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfigVersion.cmake" - DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken-${shiboken_VERSION}") -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/shiboken${shiboken_SUFFIX}.pc" + DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken2-${shiboken2_VERSION}") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/shiboken${shiboken2_SUFFIX}.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig") diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in index 5380416..c30e11c 100644 --- a/data/ShibokenConfig.cmake.in +++ b/data/ShibokenConfig.cmake.in @@ -2,4 +2,4 @@ if (NOT PYTHON_SUFFIX) message(STATUS "ShibokenConfig: Using default python: @PYTHON_SUFFIX@") SET(PYTHON_SUFFIX @PYTHON_SUFFIX@) endif() -include(@LIB_INSTALL_DIR@/cmake/Shiboken-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake) +include(@LIB_INSTALL_DIR@/cmake/Shiboken-@shiboken2_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake) diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index 84982f0..4616739 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -3,7 +3,7 @@ project(shibokengenerator) find_package(Qt5Xml) find_package(Qt5XmlPatterns) -set(shiboken_SRC +set(shiboken2_SRC generator.cpp shiboken/cppgenerator.cpp shiboken/headergenerator.cpp @@ -14,7 +14,7 @@ main.cpp ) if (NOT DISABLE_DOCSTRINGS) - set(shiboken_SRC ${shiboken_SRC} qtdoc/qtdocgenerator.cpp) + set(shiboken2_SRC ${shiboken2_SRC} qtdoc/qtdocgenerator.cpp) add_definitions(-DDOCSTRINGS_ENABLED) endif() @@ -28,10 +28,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/shiboken ${Qt5XmlPatterns_INCLUDE_DIRS} ) -add_executable(shiboken ${shiboken_SRC}) -add_dependencies(shiboken apiextractor) -set_target_properties(shiboken PROPERTIES OUTPUT_NAME shiboken${shiboken_SUFFIX}) -target_link_libraries(shiboken +add_executable(shiboken2 ${shiboken2_SRC}) +add_dependencies(shiboken2 apiextractor) +set_target_properties(shiboken2 PROPERTIES OUTPUT_NAME shiboken2${shiboken2_SUFFIX}) +target_link_libraries(shiboken2 apiextractor ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES} @@ -40,4 +40,4 @@ target_link_libraries(shiboken configure_file(shibokenconfig.h.in "${CMAKE_CURRENT_BINARY_DIR}/shibokenconfig.h" @ONLY) -install(TARGETS shiboken DESTINATION bin) +install(TARGETS shiboken2 DESTINATION bin) diff --git a/generator/shibokenconfig.h.in b/generator/shibokenconfig.h.in index b99083a..2c86a4a 100644 --- a/generator/shibokenconfig.h.in +++ b/generator/shibokenconfig.h.in @@ -1,6 +1,6 @@ #ifndef SHIBOKENCONFIG_H #define SHIBOKENCONFIG_H -#define SHIBOKEN_VERSION "@shiboken_VERSION@" +#define SHIBOKEN_VERSION "@shiboken2_VERSION@" #endif diff --git a/libshiboken/CMakeLists.txt b/libshiboken/CMakeLists.txt index c8575e7..2b5a00c 100644 --- a/libshiboken/CMakeLists.txt +++ b/libshiboken/CMakeLists.txt @@ -2,9 +2,9 @@ project(libshiboken) option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE) if(ENABLE_VERSION_SUFFIX) - set(shiboken_SUFFIX "-${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VERSION}") + set(shiboken2_SUFFIX "-${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VERSION}") else() - set(shiboken_SUFFIX "") + set(shiboken2_SUFFIX "") endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sbkversion.h.in" @@ -45,7 +45,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SPARSEHASH_INCLUDE_PATH}) add_library(libshiboken SHARED ${libshiboken_SRC}) target_link_libraries(libshiboken ${SBK_PYTHON_LIBRARIES}) -set_target_properties(libshiboken PROPERTIES OUTPUT_NAME "shiboken${shiboken_SUFFIX}${PYTHON_SUFFIX}" +set_target_properties(libshiboken PROPERTIES OUTPUT_NAME "shiboken2${shiboken2_SUFFIX}${PYTHON_SUFFIX}" VERSION ${libshiboken_VERSION} SOVERSION ${libshiboken_SOVERSION} DEFINE_SYMBOL LIBSHIBOKEN_EXPORTS) @@ -70,8 +70,8 @@ install(FILES shibokenbuffer.h sbkpython.h "${CMAKE_CURRENT_BINARY_DIR}/sbkversion.h" - DESTINATION include/shiboken${shiboken_SUFFIX}) -install(TARGETS libshiboken EXPORT shiboken + DESTINATION include/shiboken2${shiboken2_SUFFIX}) +install(TARGETS libshiboken EXPORT shiboken2 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" RUNTIME DESTINATION bin) diff --git a/shibokenmodule/CMakeLists.txt b/shibokenmodule/CMakeLists.txt index 41b20cd..b18a3ac 100644 --- a/shibokenmodule/CMakeLists.txt +++ b/shibokenmodule/CMakeLists.txt @@ -9,9 +9,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/shiboken/shiboken_module_wrapper.cpp ) add_custom_command(OUTPUT ${sample_SRC} -COMMAND ${shibokengenerator_BINARY_DIR}/shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} +COMMAND ${shibokengenerator_BINARY_DIR}/shiboken2 --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -COMMENT "Running generator for 'shiboken'..." +COMMENT "Running generator for 'shiboken2'..." ) include_directories(${CMAKE_CURRENT_SOURCE_DIR} @@ -21,7 +21,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${libshiboken_BINARY_DIR}) add_library(shibokenmodule MODULE ${sample_SRC}) set_property(TARGET shibokenmodule PROPERTY PREFIX "") -set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken") +set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken2") if(WIN32) set_property(TARGET shibokenmodule PROPERTY SUFFIX ".pyd") endif() @@ -29,6 +29,6 @@ target_link_libraries(shibokenmodule ${SBK_PYTHON_LIBRARIES} libshiboken) -add_dependencies(shibokenmodule shiboken) +add_dependencies(shibokenmodule shiboken2) install(TARGETS shibokenmodule DESTINATION ${PYTHON_SITE_PACKAGES})
\ No newline at end of file |