Skip to content

Commit

Permalink
update cmake file for aaplus
Browse files Browse the repository at this point in the history
  • Loading branch information
hvanruys committed Mar 1, 2024
1 parent 429af3f commit 0c61fad
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions aaplus/AAVSOP2013.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ bool CAAVSOP2013EphemeridesFile::WriteBinaryFile(const std::filesystem::path::va
#ifdef _MSC_VER
if (_wfopen_s(&f, pszFilename, L"wb") != 0)
#else
f = fopen(pszFilename, "wb");
f = fopen((const char *)pszFilename, "wb");
if (f == nullptr)
#endif //#ifdef _MSC_VER
return false;
Expand Down Expand Up @@ -280,7 +280,7 @@ bool CAAVSOP2013EphemeridesFile::ReadBinaryFile(const std::filesystem::path::val
#ifdef _MSC_VER
if (_wfopen_s(&f, pszFilename, L"rb") != 0)
#else
f = fopen(pszFilename, "rb");
f = fopen((const char *)pszFilename, "rb");
if (f == nullptr)
#endif //#ifdef _MSC_VER
return false;
Expand Down Expand Up @@ -411,7 +411,7 @@ bool CAAVSOP2013ElementsFile::WriteBinaryFile(const std::filesystem::path::value
#ifdef _MSC_VER
if (_wfopen_s(&f, pszFilename, L"wb") != 0)
#else
f = fopen(pszFilename, "wb");
f = fopen((const char *)pszFilename, "wb");
if (f == nullptr)
#endif //#ifdef _MSC_VER
return false;
Expand Down Expand Up @@ -465,7 +465,7 @@ bool CAAVSOP2013ElementsFile::ReadBinaryFile(const std::filesystem::path::value_
#ifdef _MSC_VER
if (_wfopen_s(&f, pszFilename, L"rb") != 0)
#else
f = fopen(pszFilename, "rb");
f = fopen((const char *)pszFilename, "rb");
if (f == nullptr)
#endif //#ifdef _MSC_VER
return false;
Expand Down
6 changes: 6 additions & 0 deletions aaplus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,15 @@ ADD_EXECUTABLE(AATest ${SRCS} )
#-----------------------------------------------------------------------------
# Libraries.
ADD_LIBRARY(aaplus-static STATIC ${SRCS_LIB} ${INCS})
if(WIN32)
target_link_libraries(aaplus-static ws2_32)
endif(WIN32)
SET_TARGET_PROPERTIES(aaplus-static PROPERTIES OUTPUT_NAME "aaplus")

ADD_LIBRARY(aaplus-shared SHARED ${SRCS_LIB} ${INCS})
if(WIN32)
target_link_libraries(aaplus-shared ws2_32)
endif(WIN32)
SET_TARGET_PROPERTIES(aaplus-shared PROPERTIES OUTPUT_NAME "aaplus")

install(TARGETS aaplus-shared aaplus-static
Expand Down
6 changes: 5 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,13 @@ target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/aaplus")

add_definitions(-DHDF5_DISABLE_VERSION_CHECK=1 -DOPENGL30)
# sequence of libraries is important !
if(WIN32)
target_link_libraries(${PROJECT_NAME} z pthread Qt5::Widgets Qt5::Gui Qt5::Core Qt5::Widgets Qt5::Xml Qt5::Concurrent Qt5::Network Qt5::PrintSupport
my_compiler_flags_1 meteosatlib QSgp4 bz2 JPEG T4 WT DISE COMP ${HDF5_LINK_LIBRARIES} ${NETCDF_LINK_LIBRARIES} archive freeimage aaplus-static ws2_32)
else()
target_link_libraries(${PROJECT_NAME} z pthread Qt5::Widgets Qt5::Gui Qt5::Core Qt5::Widgets Qt5::Xml Qt5::Concurrent Qt5::Network Qt5::PrintSupport
my_compiler_flags_1 meteosatlib QSgp4 bz2 JPEG T4 WT DISE COMP ${HDF5_LINK_LIBRARIES} ${NETCDF_LINK_LIBRARIES} archive freeimage aaplus-static)

endif()
#set_target_properties(${PROJECT_NAME}
# PROPERTIES
# ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
Expand Down
2 changes: 1 addition & 1 deletion core/formtoolbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ void FormToolbox::setupChannelGeoCombo(int index)
ui->comboGeo16->clear();


if(index == 0 || index == 1 || index == 2 || index == 3)
if(index == 0 || index == 2 || index == 3)
{
ui->comboGeo1->addItems(coloritems);
ui->comboGeo2->addItems(coloritems);
Expand Down
2 changes: 0 additions & 2 deletions core/segmentlistgeostationary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
(Written by Greg McGarragh and Simon Proud)
------------------------------------------------------------------ */


#include <QApplication>
#include <QFuture>
#include <QtConcurrent/QtConcurrent>
Expand Down

0 comments on commit 0c61fad

Please sign in to comment.