File tree Expand file tree Collapse file tree 4 files changed +21
-20
lines changed
extensions/PythonQt_QtAll Expand file tree Collapse file tree 4 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ file(GLOB SOURCES *.h *.cpp)
66
77if (BUILD_SHARED_LIBS )
88 add_library (${PROJECT_NAME} SHARED)
9+ target_compile_definitions (${PROJECT_NAME} PRIVATE PYTHONQT_QTALL_EXPORTS)
910else ()
1011 add_library (${PROJECT_NAME} STATIC )
12+ target_compile_definitions (${PROJECT_NAME} PUBLIC PYTHONQT_QTALL_STATIC)
1113endif ()
1214
1315target_sources (${PROJECT_NAME} PRIVATE
@@ -21,7 +23,6 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
2123
2224target_include_directories (${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR} )
2325
24- target_compile_definitions (${PROJECT_NAME} PRIVATE PYTHONQT_QTALL_EXPORTS)
2526
2627list (APPEND QTMODULES Core Gui Svg Sql Network OpenGL Xml XmlPatterns Multimedia Qml Quick UiTools WebEngineWidgets WebKit)
2728
Original file line number Diff line number Diff line change 3333 *
3434 */
3535
36- #ifdef WIN32
37- #ifdef PYTHONQT_QTALL_EXPORTS
38- #define PYTHONQT_QTALL_EXPORT __declspec (dllexport)
39- #else
40- #define PYTHONQT_QTALL_EXPORT __declspec (dllimport)
41- #endif
36+ #include < QtCore/qglobal.h>
37+
38+ #ifndef PYTHONQT_QTALL_STATIC
39+ # if defined(PYTHONQT_QTALL_EXPORTS)
40+ # define PYTHONQT_QTALL_EXPORT Q_DECL_EXPORT
41+ # else
42+ # define PYTHONQT_QTALL_EXPORT Q_DECL_IMPORT
43+ # endif
4244#else
43- #define PYTHONQT_QTALL_EXPORT
45+ # define PYTHONQT_QTALL_EXPORT
4446#endif
4547
4648namespace PythonQt_QtAll
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ file(GLOB SOURCES *.h *.cpp)
99
1010if (BUILD_SHARED_LIBS )
1111 add_library (${PROJECT_NAME} SHARED)
12+ target_compile_definitions (${PROJECT_NAME} PRIVATE PYTHONQT_EXPORTS)
1213else ()
1314 add_library (${PROJECT_NAME} STATIC )
15+ target_compile_definitions (${PROJECT_NAME} PUBLIC PYTHONQT_STATIC)
1416endif ()
1517
1618file (GLOB GENERATE_SOURCES
Original file line number Diff line number Diff line change 4242*/
4343//----------------------------------------------------------------------------------
4444
45+ #include <QtCore/qglobal.h>
4546
46- #if defined( WIN32 )
47- #ifdef PYTHONQT_EXPORTS
48- # define PYTHONQT_EXPORT __declspec(dllexport)
49- # else
50- # define PYTHONQT_EXPORT __declspec(dllimport)
51- # endif
47+ #ifndef PYTHONQT_STATIC
48+ # if defined( PYTHONQT_EXPORTS )
49+ # define PYTHONQT_EXPORT Q_DECL_EXPORT
50+ # else
51+ # define PYTHONQT_EXPORT Q_DECL_IMPORT
52+ # endif
5253#else
53- #ifdef PYTHONQT_EXPORTS
54- #define PYTHONQT_EXPORT __attribute__((__visibility__("default")))
55- #else
56- #define PYTHONQT_EXPORT
57- #endif
54+ # define PYTHONQT_EXPORT
5855#endif
5956
60-
6157#endif
6258
You can’t perform that action at this time.
0 commit comments