Changeset 301 in pacpusframework for trunk/src/FileLib
- Timestamp:
- Apr 8, 2014, 10:03:01 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 build 2 CMakeLists.txt.user*
-
- Property svn:ignore
-
trunk/src/FileLib/CMakeLists.txt
r111 r301 9 9 project(FileLib) 10 10 11 # ======================================== 12 # Compiler definitions 13 # ======================================== 14 add_definitions( 15 -DFILELIB_EXPORTS 11 ################################################################################ 12 create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel") 13 14 ################################################################################ 15 # DIRECTORIES 16 link_directories( 17 ${PROJECT_BINARY_DIR}/../PacpusLib 16 18 ) 17 19 18 # ========================================19 # Link directories20 # ======================================== 21 link_directories( 22 ${PROJECT_BINARY_DIR}/../PacpusLib20 ################################################################################ 21 # FILES 22 set(SRCS 23 src/DbiteException.cpp 24 src/DbiteFile.cpp 23 25 ) 24 26 25 # ======================================== 26 # List of sources 27 # ======================================== 28 set( 29 PROJECT_SRCS 27 set(HDRS 28 ${EXPORT_HDR} 29 30 30 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteException.h 31 31 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFile.h 32 32 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFileTypes.h 33 33 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/FileLibConfig.h 34 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t 34 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t.h 35 35 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h 36 src/DbiteException.cpp37 src/DbiteFile.cpp38 36 ) 39 37 40 # ======================================== 41 # Build a library 42 # ======================================== 43 pacpus_add_library( 44 ${PROJECT_NAME} SHARED 45 ${PROJECT_SRCS} 38 ################################################################################ 39 # BUILD and LINK 40 pacpus_add_library(${PROJECT_NAME} SHARED 41 ${SRCS} 42 ${HDRS} 46 43 ) 47 44 48 # ======================================== 49 # Libraries 50 # ======================================== 45 # LIBS 46 set(LIBS 47 ${PACPUS_DEPENDENCIES_LIB} 48 ) 49 51 50 if(WIN32) 52 target_link_libraries( 53 ${PROJECT_NAME} 54 ${PACPUS_DEPENDENCIES_LIB} 55 optimized PacpusLib debug PacpusLib_d 56 ) 51 list(APPEND LIBS 52 optimized PacpusLib debug PacpusLib_d 53 ) 57 54 endif() 58 55 59 # ======================================== 56 # LINK 57 target_link_libraries(${PROJECT_NAME} 58 ${LIBS} 59 ) 60 61 if(${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 endif() 78 79 ################################################################################ 60 80 # Install 61 # ========================================62 81 pacpus_install(${PROJECT_NAME}) 63 82 64 # ======================================== 65 # Folder 66 # ======================================== 83 ################################################################################ 84 # FOLDER 67 85 pacpus_folder(${PROJECT_NAME} "libraries") -
trunk/src/FileLib/test/TestFileLib.cpp
r89 r301 17 17 #endif // _MSC_VER 18 18 19 #include <Pacpus/kernel/DbiteException.h> 20 #include <Pacpus/kernel/DbiteFile.h> 21 #include <Pacpus/kernel/Log.h> 22 19 23 #include <boost/noncopyable.hpp> 20 24 #include <cstdio> 21 25 22 #include "kernel/DbiteException.h" 23 #include "kernel/DbiteFile.h" 24 #include "kernel/Log.h" 25 26 DECLARE_STATIC_LOGGER("pacpus.core.TestFileLib"); 26 DECLARE_STATIC_LOGGER("pacpus.framework.test.FileLib"); 27 27 28 28 using namespace boost;
Note:
See TracChangeset
for help on using the changeset viewer.