Skip to content

Commit

Permalink
Adds export header
Browse files Browse the repository at this point in the history
We need it because LXQtCompilerSettings makes all symbols hidden by
default.
  • Loading branch information
luis-pereira authored and Yen Chi Hsuan committed Mar 5, 2017
1 parent 2bc47dc commit b1f37a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
project(qtermwidget)

include(GNUInstallDirs)
include(GenerateExportHeader)
include(CMakePackageConfigHelpers)
include(CheckFunctionExists)

Expand Down Expand Up @@ -164,6 +165,12 @@ target_compile_definitions(${QTERMWIDGET_LIBRARY_NAME}
"HAVE_SYS_TIME_H"
)


generate_export_header(${QTERMWIDGET_LIBRARY_NAME}
EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/lib/qtermwidget_export.h"
EXPORT_MACRO_NAME QTERMWIDGET_EXPORT
)

write_basic_package_version_file(
"${CMAKE_BINARY_DIR}/${QTERMWIDGET_LIBRARY_NAME}-config-version.cmake"
VERSION ${QTERMWIDGET_VERSION}
Expand All @@ -176,7 +183,10 @@ install(FILES
COMPONENT Devel
)
install(TARGETS ${QTERMWIDGET_LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(FILES ${HDRS_DISTRIB} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${QTERMWIDGET_LIBRARY_NAME}")
install(FILES
${HDRS_DISTRIB} "${CMAKE_CURRENT_BINARY_DIR}/lib/qtermwidget_export.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${QTERMWIDGET_LIBRARY_NAME}"
)
# keyboard layouts
install(DIRECTORY lib/kb-layouts/ DESTINATION "${KB_LAYOUT_DIR}" FILES_MATCHING PATTERN "*.keytab" )
# color schemes
Expand Down
3 changes: 2 additions & 1 deletion lib/qtermwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
#include <QTranslator>
#include <QWidget>
#include "Filter.h"
#include "qtermwidget_export.h"

class QVBoxLayout;
struct TermWidgetImpl;
class SearchBar;
class QUrl;

class QTermWidget : public QWidget {
class QTERMWIDGET_EXPORT QTermWidget : public QWidget {
Q_OBJECT
public:

Expand Down

0 comments on commit b1f37a8

Please sign in to comment.