Skip to content

Commit 3754fa9

Browse files
committed
addded library compilation and stuff
1 parent 02f0d8f commit 3754fa9

30 files changed

+1078
-4
lines changed

CMakeLists.txt

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
cmake_minimum_required(VERSION 3.8)
2-
project(ImageLoading)
2+
project(VividImage)
33

44
set(CMAKE_CXX_STANDARD 11)
55

6-
set(SOURCE_FILES main.cpp image.cpp image.h bitarray.cpp bitarray.h node.h tree.cpp tree.h)
7-
add_executable(ImageLoading ${SOURCE_FILES})
6+
set(BUILD_LIBRARY false)
7+
8+
set(MAIN_FILE main.cpp)
9+
set(HEADER_FILES image.h bitarray.h node.h tree.h)
10+
set(CPP_FILES image.cpp bitarray.cpp tree.cpp)
11+
12+
if (BUILD_LIBRARY)
13+
FILE(REMOVE_RECURSE bin/library/)
14+
add_library(VividImage STATIC ${CPP_FILES})
15+
set_target_properties(VividImage PROPERTIES PREFIX "")
16+
set_target_properties(VividImage PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/library/VividImage/libs/")
17+
FILE(COPY ${HEADER_FILES} DESTINATION "${PROJECT_SOURCE_DIR}/bin/library/VividImage/include/VividImage/")
18+
FILE(COPY ${CPP_FILES} DESTINATION "${PROJECT_SOURCE_DIR}/bin/library/VividImage/src/VividImage/")
19+
FILE(COPY librarydependecies/CMakeLists.txt DESTINATION "${PROJECT_SOURCE_DIR}/bin/library/VividImage/")
20+
else (BUILD_LIBRARY)
21+
FILE(REMOVE_RECURSE bin/debug/)
22+
add_executable(VividImage ${MAIN_FILE} ${HEADER_FILES} ${CPP_FILES})
23+
set_target_properties(VividImage PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/debug/")
24+
FILE(GLOB RES_FILES res/*)
25+
FILE(COPY ${RES_FILES} DESTINATION "${PROJECT_SOURCE_DIR}/bin/debug/")
26+
endif (BUILD_LIBRARY)

bin/debug/VividImage.exe

1.25 MB
Binary file not shown.

bin/debug/libgcc_s_seh-1.dll

72.5 KB
Binary file not shown.

bin/debug/libstdc++-6.dll

1.36 MB
Binary file not shown.

bin/debug/libwinpthread-1.dll

50.5 KB
Binary file not shown.
317 KB
Loading

bin/debug/res/cartoon_goat.png

39.9 KB
Loading

bin/debug/res/goat.png

158 KB
Loading

bin/debug/res/smile.png

200 Bytes
Loading

bin/debug/res/squiggles.png

359 KB
Loading

0 commit comments

Comments
 (0)