source: pacpusframework/trunk/src/FileLib/CMakeLists.txt@ 308

Last change on this file since 308 was 302, checked in by Marek Kurdej, 11 years ago

[test] Installing data files for testing.

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(FileLib)
10
11################################################################################
12create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel")
13
14################################################################################
15# DIRECTORIES
16link_directories(
17 ${PROJECT_BINARY_DIR}/../PacpusLib
18)
19
20################################################################################
21# FILES
22set(SRCS
23 src/DbiteException.cpp
24 src/DbiteFile.cpp
25)
26
27set(HDRS
28 ${EXPORT_HDR}
29
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.h
35 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
36)
37
38################################################################################
39# BUILD and LINK
40pacpus_add_library(${PROJECT_NAME} SHARED
41 ${SRCS}
42 ${HDRS}
43)
44
45# LIBS
46set(LIBS
47 ${PACPUS_DEPENDENCIES_LIB}
48)
49
50if(WIN32)
51 list(APPEND LIBS
52 optimized PacpusLib debug PacpusLib_d
53 )
54endif()
55
56# LINK
57target_link_libraries(${PROJECT_NAME}
58 ${LIBS}
59)
60
61if(${PACPUS_BUILD_TESTS})
62 link_directories(
63 ${PROJECT_BINARY_DIR}/../FileLib
64 )
65 pacpus_add_test_executable(Test${PROJECT_NAME}
66 test/TestFileLib.cpp
67 ${HDRS}
68 )
69 list(APPEND LIBS
70 ${QT_LIBRARIES}
71 optimized PacpusLib debug PacpusLib_d
72 optimized ${PROJECT_NAME} debug ${PROJECT_NAME}_d
73 )
74 target_link_libraries(Test${PROJECT_NAME}
75 ${LIBS}
76 )
77 pacpus_install(Test${PROJECT_NAME})
78 install(DIRECTORY test/data
79 DESTINATION ${PACPUS_INSTALL_DIR}/bin
80 )
81endif()
82
83################################################################################
84# Install
85pacpus_install(${PROJECT_NAME})
86
87################################################################################
88# FOLDER
89pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.