Created
May 26, 2024 20:58
-
-
Save stgatilov/9192e9352144089412a5dc9af6f3ac45 to your computer and use it in GitHub Desktop.
conan libjpeg: WPO on msvc issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 3.9.6) | |
project(testapp) | |
find_package(fltk REQUIRED) | |
add_executable(testapp test.cpp) | |
target_link_libraries(testapp fltk::fltk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from conan import ConanFile | |
from conan.tools.cmake import cmake_layout, CMake | |
class TestApp(ConanFile): | |
name = "testapp" | |
settings = "os", "compiler", "build_type", "arch" | |
generators = "CMakeDeps", "CMakeToolchain" | |
requires = [ | |
"fltk/1.3.9", | |
] | |
def layout(self): | |
cmake_layout(self) | |
def configure(self): | |
self.options["fltk"].with_gdiplus = False | |
pass | |
def build(self): | |
cmake = CMake(self) | |
cmake.configure() | |
cmake.build() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FL/Fl.H> /* FLTK main FLTK */ | |
#include <FL/Fl_Window.H> /* FLTK window FLTK */ | |
#include <FL/Fl_Button.H> /* FLTK button FLTK */ | |
#include <FL/Fl_JPEG_Image.H> | |
#include <stdio.h> /* I/O lib ISOC */ | |
#include <stdlib.h> /* Standard Lib ISOC */ | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
static void daButCall(Fl_Widget *w, void *uData) | |
{ | |
printf("The button was pressed\n"); | |
} | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
int main() | |
{ | |
Fl_Window win(500, 70, "Simple Button Demo Program"); | |
Fl_Button but(20, 20, 460, 30, "Test Button"); | |
but.callback(daButCall, (void *)0); | |
win.show(); | |
Fl_JPEG_Image img("test.jpg"); | |
return Fl::run(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment