Skip to content

Commit 97346f2

Browse files
committed
COMP: The installed package should be named PythonQt
Rename so that the important installed package is named PythonQt (instead of Core).
1 parent 1921dc8 commit 97346f2

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.27)
22

3-
project(PythonQt LANGUAGES CXX VERSION 3.5.6)
3+
project(PythonQtParent LANGUAGES CXX VERSION 3.5.6)
44

55
#-----------------------------------------------------------------------------
66
# Set a default build type if none was specified
@@ -36,6 +36,11 @@ add_compile_definitions( -DQT_NO_CAST_FROM_ASCII
3636
-DQT_NO_CAST_TO_QVARIANT
3737
-DQT_NO_CAST_FROM_QVARIANT )
3838
endif()
39+
# Python build properties
40+
add_definitions(
41+
-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK
42+
-DPYTHONQT_SUPPORT_NAME_PROPERTY
43+
)
3944

4045
option(FORCE_BUILD_QT5 "Force Qt5 build instead of Qt6" OFF)
4146

src/CMakeLists.txt

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
project(Core LANGUAGES CXX)
1+
# This is the actual package to be installed
2+
# PythonQtParent project contains all compontents
3+
project(PythonQt LANGUAGES CXX)
24

35
set(CMAKE_AUTOMOC ON)
46

@@ -98,11 +100,34 @@ elseif(MINGW)
98100
target_compile_options(${PROJECT_NAME} PRIVATE "-Wa,-mbig-obj")
99101
endif()
100102

103+
#-----------------------------------------------------------------------------
104+
# Build options
105+
106+
if(NOT DEFINED PythonQt_INSTALL_RUNTIME_DIR)
107+
set(PythonQt_INSTALL_RUNTIME_DIR bin)
108+
endif()
109+
110+
if(NOT DEFINED PythonQt_INSTALL_LIBRARY_DIR)
111+
set(PythonQt_INSTALL_LIBRARY_DIR lib${LIB_SUFFIX})
112+
endif()
113+
114+
if(NOT DEFINED PythonQt_INSTALL_ARCHIVE_DIR)
115+
set(PythonQt_INSTALL_ARCHIVE_DIR lib${LIB_SUFFIX})
116+
endif()
117+
118+
if(NOT DEFINED PythonQt_INSTALL_INCLUDE_DIR)
119+
set(PythonQt_INSTALL_INCLUDE_DIR include/PythonQt)
120+
endif()
121+
122+
101123
include(GNUInstallDirs)
124+
#-----------------------------------------------------------------------------
125+
# Install library (on windows, put the dll in 'bin' and the archive in 'lib')
126+
102127
install(TARGETS ${PROJECT_NAME}
103128
BUNDLE DESTINATION .
104-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
105-
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
106-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
107-
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
129+
LIBRARY DESTINATION ${PythonQt_INSTALL_LIBRARY_DIR}
130+
ARCHIVE DESTINATION ${PythonQt_INSTALL_ARCHIVE_DIR}
131+
RUNTIME DESTINATION ${PythonQt_INSTALL_RUNTIME_DIR}
132+
PUBLIC_HEADER DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR}
108133
)

0 commit comments

Comments
 (0)