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
This commit is contained in:
Bill Somerville 2016-05-24 16:05:13 +00:00
parent 27fb2d8126
commit d7e7d1d5c7

View File

@ -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)