Skip to content

Commit

Permalink
In CMakeLists.txt add if statement for WIN32 or UNIX
Browse files Browse the repository at this point in the history
  • Loading branch information
hvanruys committed Dec 21, 2022
1 parent 58bfae9 commit c8f6111
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
cmake_minimum_required(VERSION 3.5)

project(EUMETCastView VERSION 1.5.5 LANGUAGES CXX)
project(EUMETCastView VERSION 1.5.6 LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_PREFIX_PATH /home/hugo/Qt/5.15.2/gcc_64)
if(UNIX)
set(CMAKE_PREFIX_PATH /home/hugo/Qt/5.15.2/gcc_64)
endif()

add_library(my_compiler_flags_1 INTERFACE)
target_compile_features(my_compiler_flags_1 INTERFACE cxx_std_11)
Expand Down
7 changes: 6 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ cmake_print_variables(UI_RESOURCES_RCC)
cmake_print_properties(TARGETS Qt5::Widgets PROPERTIES LOCATION)
cmake_print_properties(TARGETS Qt5::Xml PROPERTIES LOCATION)

add_executable(${PROJECT_NAME} ${PROJECT_SOURCES_CPP} EUMETCastView.qrc shaders.qrc)
if(UNIX)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES_CPP} EUMETCastView.qrc shaders.qrc)
elseif(WIN32)
add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES_CPP} EUMETCastView.qrc shaders.qrc)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")

add_definitions(-DHDF5_DISABLE_VERSION_CHECK=1 -DOPENGL30)
Expand Down
3 changes: 0 additions & 3 deletions core/formmovie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,6 @@ void FormMovie::on_btnCreateXML_clicked()
mylistout.append(list);
}


ui->lwTraffic->addItem(QString("=== Start creation video %1 ! ===").arg(outputvideoname));

tag = doc.createElement("ffmpegparameters");
root.appendChild(tag);
QString myopt;
Expand Down
6 changes: 5 additions & 1 deletion video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 REQUIRED Core Gui Widgets Xml Concurrent Network PrintSupport)

add_executable(${PROJECT_NAME} ${PROJECT_SOURCES})
if(UNIX)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES})
elseif(WIN32)
add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES})
endif()

target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/QSgp4")
Expand Down

0 comments on commit c8f6111

Please sign in to comment.