From a378930f66d5590ee3859d8f99ef40cac578d455 Mon Sep 17 00:00:00 2001 From: Ioan Chera Date: Mon, 29 Jul 2024 22:28:55 +0300 Subject: [PATCH] Corrected Windows build errors --- src/CMakeLists.txt | 20 ++++++++++++-------- src/main.cc | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a4a27b58..4d762fb8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -245,13 +245,12 @@ include(FetchContent) FetchContent_Declare( FLTK - GIT_REPOSITORY https://github.com/fltk/fltk - GIT_SHALLOW TRUE + GIT_REPOSITORY https://github.com/fltk/fltk.git GIT_TAG 9c7a4737784cfd3abe5b71ee8104a700e4f7959f # master at some point ) FetchContent_MakeAvailable(FLTK) target_include_directories( - eurekasrc + eurekasrc PUBLIC ${fltk_BINARY_DIR} ${fltk_SOURCE_DIR} @@ -280,11 +279,11 @@ if(UNIX AND NOT APPLE) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) target_link_libraries( - eurekasrc - PUBLIC - ${X11_Xpm_LIB} - ${ZLIB_LIBRARIES} - ${JPEG_LIBRARIES} + eurekasrc + PUBLIC + ${X11_Xpm_LIB} + ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ) else() @@ -293,6 +292,11 @@ else() PRIVATE fltk_jpeg fltk_png fltk_z ) + target_include_directories( + eurekasrc + PUBLIC + ${fltk_SOURCE_DIR}/zlib + ) endif() target_link_libraries(eurekasrc PUBLIC ${OPENGL_LIBRARIES}) diff --git a/src/main.cc b/src/main.cc index 6be249b4..0dfa286b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -74,6 +74,7 @@ #include "OSXCalls.h" #include #elif defined(_WIN32) +#include #else #include #include