From 01cbecb838aed327bbda19c8ec56eaf52cc70514 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 24 May 2016 16:05:13 +0000 Subject: [PATCH] Export the correct compile definitions for the static wsjtx_udp library git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6697 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b032119f8..f93117967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -978,7 +978,7 @@ endif (${OPENMP_FOUND} OR APPLE) # build a library of package Qt functionality add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS}) # set wsjtx_udp exports to static variants -set_target_properties (wsjt_qt PROPERTIES COMPILE_FLAGS -DUDP_STATIC_DEFINE) +target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE) target_link_libraries (wsjt_qt Qt5::Widgets Qt5::Network) target_include_directories (wsjt_qt BEFORE PRIVATE ${hamlib_INCLUDE_DIRS}) if (WIN32) @@ -1070,8 +1070,6 @@ set_target_properties (wsjtx PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.k1jt.wsjtx" ) -# set wsjtx_udp exports to static variants -set_target_properties (wsjtx PROPERTIES COMPILE_FLAGS -DUDP_STATIC_DEFINE) target_link_libraries (wsjtx wsjt_fort wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES}) qt5_use_modules (wsjtx SerialPort) # not sure why the interface link library syntax above doesn't work @@ -1090,9 +1088,9 @@ set_target_properties (wsjtx_udp PROPERTIES PUBLIC_HEADER "${UDP_library_HEADERS}" ) set_target_properties (wsjtx_udp-static PROPERTIES - COMPILE_FLAGS -DUDP_STATIC_DEFINE OUTPUT_NAME wsjtx_udp ) +target_compile_definitions (wsjtx_udp-static PUBLIC UDP_STATIC_DEFINE) qt5_use_modules (wsjtx_udp Network) qt5_use_modules (wsjtx_udp-static Network) generate_export_header (wsjtx_udp BASE_NAME udp)