1 | #################################################
|
---|
2 | # ___________ ____ ______ __ __ _____ #
|
---|
3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
---|
4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
---|
5 | # | __(____ /\___ > __/|____//____ > #
|
---|
6 | # |__| \/ \/|__| \/ #
|
---|
7 | # #
|
---|
8 | #################################################
|
---|
9 | project(FileLib)
|
---|
10 |
|
---|
11 | # ========================================
|
---|
12 | # Compiler definitions
|
---|
13 | # ========================================
|
---|
14 | add_definitions(
|
---|
15 | -DFILELIB_EXPORTS
|
---|
16 | )
|
---|
17 |
|
---|
18 | # ========================================
|
---|
19 | # Link directories
|
---|
20 | # ========================================
|
---|
21 | link_directories(
|
---|
22 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
---|
23 | )
|
---|
24 |
|
---|
25 | # ========================================
|
---|
26 | # List of sources
|
---|
27 | # ========================================
|
---|
28 | set(
|
---|
29 | PROJECT_SRCS
|
---|
30 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteException.h
|
---|
31 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFile.h
|
---|
32 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFileTypes.h
|
---|
33 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/FileLibConfig.h
|
---|
34 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t
|
---|
35 | ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
|
---|
36 | src/DbiteException.cpp
|
---|
37 | src/DbiteFile.cpp
|
---|
38 | )
|
---|
39 |
|
---|
40 | # ========================================
|
---|
41 | # Build a library
|
---|
42 | # ========================================
|
---|
43 | pacpus_add_library(
|
---|
44 | ${PROJECT_NAME} SHARED
|
---|
45 | ${PROJECT_SRCS}
|
---|
46 | )
|
---|
47 |
|
---|
48 | # ========================================
|
---|
49 | # Libraries
|
---|
50 | # ========================================
|
---|
51 | if(WIN32) # TODO find other solution
|
---|
52 | target_link_libraries(
|
---|
53 | ${PROJECT_NAME}
|
---|
54 | #optimized PacpusLib debug PacpusLib_d
|
---|
55 | PacpusLib
|
---|
56 | )
|
---|
57 | endif()
|
---|
58 |
|
---|
59 | # ========================================
|
---|
60 | # Install
|
---|
61 | # ========================================
|
---|
62 | pacpus_install(${PROJECT_NAME})
|
---|
63 |
|
---|
64 | # ========================================
|
---|
65 | # Folder
|
---|
66 | # ========================================
|
---|
67 | pacpus_folder(${PROJECT_NAME} "libraries")
|
---|