mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 06:30:52 +00:00
initial cmake support
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@477 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
22
examples/basic/CMakeLists.txt
Normal file
22
examples/basic/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
# $Id$
|
||||
file(
|
||||
GLOB
|
||||
EXAMPLE_BASIC_SOURCES
|
||||
*.c
|
||||
)
|
||||
|
||||
foreach(PATH IN LISTS EXAMPLE_BASIC_SOURCES)
|
||||
get_filename_component(
|
||||
TARGET
|
||||
${PATH}
|
||||
NAME_WE
|
||||
)
|
||||
add_executable(
|
||||
${TARGET} ${PATH}
|
||||
)
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
Mw
|
||||
)
|
||||
endforeach()
|
||||
@@ -12,6 +12,10 @@ int main() {
|
||||
MwLLPixmap px2 = MwLoadImage(window, "examples/picture.jpg");
|
||||
MwLLPixmap px3 = MwLoadImage(window, "resource/logo.png");
|
||||
|
||||
if(px == NULL)px = MwLoadImage(window, "../examples/picture.png");
|
||||
if(px2 == NULL)px2 = MwLoadImage(window, "../examples/picture.jpg");
|
||||
if(px3 == NULL)px3 = MwLoadImage(window, "../resource/logo.png");
|
||||
|
||||
MwVaApply(window,
|
||||
MwNiconPixmap, px,
|
||||
NULL);
|
||||
|
||||
Reference in New Issue
Block a user