From 29330f0c72c6e647b7c4b46d19be3a0c8b327508 Mon Sep 17 00:00:00 2001 From: xshen <747729633@qq.com> Date: Fri, 3 Dec 2021 21:44:02 +0800 Subject: [PATCH] fix shared library in windows --- CMakeLists.txt | 5 ++--- include/replxx.hxx | 14 +++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 915d80d..952797b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,10 +75,9 @@ target_include_directories( ) target_compile_definitions( replxx - PUBLIC - $<$>:REPLXX_STATIC> - $<$:REPLXX_BUILDING_DLL> PRIVATE + $<$>:REPLXX_STATIC> + $<$:REPLXX_BUILDING_DLL> $<$:_CRT_SECURE_NO_WARNINGS=1 /ignore:4503> ) target_compile_options( diff --git a/include/replxx.hxx b/include/replxx.hxx index 4928cb2..03d3de8 100644 --- a/include/replxx.hxx +++ b/include/replxx.hxx @@ -260,7 +260,7 @@ public: } }; class HistoryScanImpl; - class HistoryScan { + class REPLXX_IMPEXP HistoryScan { public: typedef std::unique_ptr impl_t; private: @@ -663,35 +663,35 @@ namespace color { * \param color2 - second input color. * \return A new color definition that represent combined input colors. */ -Replxx::Color operator | ( Replxx::Color color1, Replxx::Color color2 ); +Replxx::Color REPLXX_IMPEXP operator | ( Replxx::Color color1, Replxx::Color color2 ); /*! \brief Transform foreground color definition into a background color definition. * * \param color - an input foreground color definition. * \return A background color definition that is a transformed input \e color. */ -Replxx::Color bg( Replxx::Color color ); +Replxx::Color REPLXX_IMPEXP bg( Replxx::Color color ); /*! \brief Add `bold` attribute to color definition. * * \param color - an input color definition. * \return A new color definition with bold attribute set. */ -Replxx::Color bold( Replxx::Color color ); +Replxx::Color REPLXX_IMPEXP bold( Replxx::Color color ); /*! \brief Add `underline` attribute to color definition. * * \param color - an input color definition. * \return A new color definition with underline attribute set. */ -Replxx::Color underline( Replxx::Color color ); +Replxx::Color REPLXX_IMPEXP underline( Replxx::Color color ); /*! \brief Create a new grayscale color of given brightness level. * * \param level - a brightness level for new color, must be between 0 (darkest) and 23 (brightest). * \return A new grayscale color of a given brightest \e level. */ -Replxx::Color grayscale( int level ); +Replxx::Color REPLXX_IMPEXP grayscale( int level ); /*! \brief Create a new color in 6×6×6 RGB color space from base component levels. * @@ -700,7 +700,7 @@ Replxx::Color grayscale( int level ); * \param blue - a blue (of RGB) component level, must be 0 and 5. * \return A new color in 6×6×6 RGB color space. */ -Replxx::Color rgb666( int red, int green, int blue ); +Replxx::Color REPLXX_IMPEXP rgb666( int red, int green, int blue ); }