1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(FileLib)
|
---|
10 |
|
---|
11 | if(${PACPUS_BUILD_TESTS})
|
---|
12 | add_subdirectory(test)
|
---|
13 | endif()
|
---|
14 |
|
---|
15 | ################################################################################
|
---|
16 | create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel")
|
---|
17 |
|
---|
18 | ################################################################################
|
---|
19 | # DIRECTORIES
|
---|
20 | link_directories(
|
---|
21 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
22 | )
|
---|
23 |
|
---|
24 | ################################################################################
|
---|
25 | # FILES
|
---|
26 | set(SRCS
|
---|
27 | src/DbiteException.cpp
|
---|
28 | src/DbiteFile.cpp
|
---|
29 | )
|
---|
30 |
|
---|
31 | set(HDRS
|
---|
32 | ${EXPORT_HDR}
|
---|
33 |
|
---|
34 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteException.h
|
---|
35 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFile.h
|
---|
36 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFileTypes.h
|
---|
37 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/FileLibConfig.h
|
---|
38 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t.h
|
---|
39 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
|
---|
40 | )
|
---|
41 |
|
---|
42 | ################################################################################
|
---|
43 | # BUILD and LINK
|
---|
44 | pacpus_add_library(${PROJECT_NAME} SHARED
|
---|
45 | ${SRCS}
|
---|
46 | ${HDRS}
|
---|
47 | )
|
---|
48 |
|
---|
49 | # LIBS
|
---|
50 | set(LIBS
|
---|
51 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
52 | )
|
---|
53 |
|
---|
54 | if(WIN32)
|
---|
55 | list(APPEND LIBS
|
---|
56 | optimized PacpusLib debug PacpusLib_d
|
---|
57 | )
|
---|
58 | endif()
|
---|
59 |
|
---|
60 | # LINK
|
---|
61 | target_link_libraries(${PROJECT_NAME}
|
---|
62 | ${LIBS}
|
---|
63 | )
|
---|
64 |
|
---|
65 | ################################################################################
|
---|
66 | # INSTALL
|
---|
67 | pacpus_install(${PROJECT_NAME})
|
---|
68 |
|
---|
69 | ################################################################################
|
---|
70 | # FOLDER
|
---|
71 | pacpus_folder(${PROJECT_NAME} "libraries")
|
---|