Changeset - 4a38ea66a42a
[Not reviewed]
recording
0 2 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2017-02-15 08:31:44
hy@ozderya.net
fix linking issues of color widgets on windows
2 files changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -50,24 +50,27 @@ else (BUILD_QWT)
 
	set(QWT_LIBRARY ${QWT_STATIC_LIBRARY})
 
	set(QWT_INCLUDE_DIR ${QWT_STATIC_INCLUDE})
 
  else (QWT_USE_STATIC)
 
	find_package(Qwt 6.1 REQUIRED)
 
  endif (QWT_USE_STATIC)
 
endif (BUILD_QWT)
 

	
 
include(BuildQColorWidgets)
 

	
 
# includes
 
include_directories("./src" ${QWT_INCLUDE_DIR} ${QCW_INCLUDE_DIR})
 

	
 
# flags
 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QCW_FLAGS}")
 

	
 
# wrap UI and resource files
 
qt5_wrap_ui(UI_FILES
 
  src/mainwindow.ui
 
  src/portcontrol.ui
 
  src/about_dialog.ui
 
  src/snapshotview.ui
 
  src/commandpanel.ui
 
  src/commandwidget.ui
 
  src/dataformatpanel.ui
 
  src/plotcontrolpanel.ui
 
  src/recordpanel.ui
 
  src/numberformatbox.ui
cmake/modules/BuildQColorWidgets.cmake
Show inline comments
 
@@ -14,18 +14,20 @@
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
include(ExternalProject)
 

	
 
ExternalProject_Add(QCW
 
  PREFIX qcw
 
  GIT_REPOSITORY https://github.com/mbasaglia/Qt-Color-Widgets
 
  PATCH_COMMAND patch -t -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/qt_5_2_moc_creation_namespace_fix.diff
 
  CMAKE_CACHE_ARGS "-DCMAKE_CXX_FLAGS:string=-D QTCOLORWIDGETS_STATICALLY_LINKED"
 
  UPDATE_COMMAND ""
 
  INSTALL_COMMAND "")
 

	
 
ExternalProject_Get_Property(QCW binary_dir source_dir)
 
set(QCW_FLAGS "-D QTCOLORWIDGETS_STATICALLY_LINKED")
 
set(QCW_LIBRARY ${binary_dir}/libColorWidgets-qt5.a)
 
set(QCW_INCLUDE_DIR ${source_dir}/include)
0 comments (0 inline, 0 general)