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