summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 000000000..40a42f635
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,98 @@
+
+# prepare includes
+
+file( GLOB_RECURSE _includes RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h )
+list( SORT _includes )
+
+unset( _private_includes )
+foreach( _include IN LISTS _includes )
+
+ # skip 3rdparty, attic, moc, sql drivers and obsolete includes
+ if( "${_include}" MATCHES "^(3rdparty/|attic/|moc/|sql/drivers/|kernel/(qt_pch|qwindow))" )
+ list( REMOVE_ITEM _includes "${_include}" )
+ endif()
+
+ # split private includes
+ if( "${_include}" MATCHES "_p.h$" )
+ list( REMOVE_ITEM _includes "${_include}" )
+ list( APPEND _private_includes "${_include}" )
+ endif()
+
+endforeach( _include )
+
+if( BUILD_LIB )
+ unset( _prepare_includes )
+else()
+ set( _prepare_includes "ONLY_SYMLINK" )
+endif()
+
+tqt_install_includes( ${_includes} ${_prepare_includes} )
+tqt_install_includes( ${_private_includes} DESTINATION "private" ${_prepare_includes} )
+
+
+if( BUILD_LIB )
+
+# subdirectories
+
+set( tqtlib_embed "" )
+
+add_subdirectory( tools )
+add_subdirectory( kernel )
+add_subdirectory( codecs )
+#add_subdirectory( moc )
+
+tde_conditional_add_subdirectory( WITH_MODULE_STYLES styles )
+tde_conditional_add_subdirectory( WITH_MODULE_CANVAS canvas )
+tde_conditional_add_subdirectory( WITH_MODULE_DIALOGS dialogs )
+tde_conditional_add_subdirectory( WITH_MODULE_INPUTMETHOD inputmethod )
+tde_conditional_add_subdirectory( WITH_MODULE_TABLE table )
+tde_conditional_add_subdirectory( WITH_MODULE_WIDGETS widgets )
+tde_conditional_add_subdirectory( WITH_MODULE_WORKSPACE workspace )
+tde_conditional_add_subdirectory( WITH_MODULE_XML xml )
+tde_conditional_add_subdirectory( WITH_MODULE_NETWORK network )
+tde_conditional_add_subdirectory( WITH_MODULE_OPENGL opengl )
+tde_conditional_add_subdirectory( WITH_MODULE_SQL sql )
+
+
+##### tqt3 library
+
+configure_file( ${TDE_CMAKE_TEMPLATES}/tde_dummy_cpp.cmake dummy.cpp COPYONLY )
+
+tde_add_library( tqt-mt SHARED
+
+ SOURCES
+ dummy.cpp
+ EMBED
+ ${tqtlib_embed}
+ LINK
+ ${CMAKE_THREAD_LIBS_INIT}
+
+ VERSION 3.5.0
+
+ DESTINATION ${LIB_INSTALL_DIR}
+)
+
+
+##### other data
+
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" QT_INSTALL_HEADERS ${INCLUDE_INSTALL_DIR} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" QT_INSTALL_LIBS ${LIB_INSTALL_DIR} )
+
+configure_file( ${PROJECT_NAME}.pc.cmake ${PROJECT_NAME}.pc @ONLY )
+
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
+ DESTINATION ${PKGCONFIG_INSTALL_DIR}
+)
+
+install(
+ FILES
+ ${CMAKE_BINARY_DIR}/include/ntqconfig.h
+ ${CMAKE_BINARY_DIR}/include/ntqmodules.h
+
+ DESTINATION
+ ${QT_INSTALL_HEADERS}
+)
+
+endif()