Changeset 313 in pacpusframework for trunk/src/FileLib


Ignore:
Timestamp:
Jul 28, 2014, 4:35:46 PM (10 years ago)
Author:
Marek Kurdej
Message:

Separated projects: FileLib and TestFileLib.

Location:
trunk/src/FileLib
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/FileLib/CMakeLists.txt

    r312 r313  
    6060
    6161if(${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         optimized ${PROJECT_NAME} debug ${PROJECT_NAME}_d
    71     )
    72     target_link_libraries(Test${PROJECT_NAME}
    73         ${LIBS}
    74     )
    75     pacpus_install(Test${PROJECT_NAME})
    76     install(DIRECTORY test/data
    77         DESTINATION ${PACPUS_INSTALL_DIR}/bin
    78     )
     62    add_subdirectory(test)
    7963endif()
    8064
    8165################################################################################
    82 # Install
     66# INSTALL
    8367pacpus_install(${PROJECT_NAME})
    8468
  • trunk/src/FileLib/test/CMakeLists.txt

    • Property svn:executable deleted
    r312 r313  
    77#                                               #
    88#################################################
    9 project(FileLib)
     9project(TestFileLib)
    1010
    1111################################################################################
    12 create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel")
     12# necessary because TestFileLib is a subdirectory of FileLib and all definitions
     13# are inherited
     14undef_export(FileLib)
    1315
    1416################################################################################
    1517# DIRECTORIES
    1618link_directories(
    17     ${PROJECT_BINARY_DIR}/../PacpusLib
     19    ${PROJECT_BINARY_DIR}/../../FileLib
     20    ${PROJECT_BINARY_DIR}/../../PacpusLib
    1821)
    1922
     
    2124# FILES
    2225set(SRCS
    23     src/DbiteException.cpp
    24     src/DbiteFile.cpp
     26    TestFileLib.cpp
    2527)
    2628
    2729set(HDRS
    28     ${EXPORT_HDR}
    29 
    30     ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteException.h
    3130    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFile.h
    32     ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFileTypes.h
    3331    ${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
    3632)
    3733
    3834################################################################################
    3935# BUILD and LINK
    40 pacpus_add_library(${PROJECT_NAME} SHARED
     36pacpus_add_test_executable(${PROJECT_NAME}
    4137    ${SRCS}
    4238    ${HDRS}
     
    5046if(WIN32)
    5147    list(APPEND LIBS
     48        optimized FileLib debug FileLib_d
    5249        optimized PacpusLib debug PacpusLib_d
    5350    )
     
    5956)
    6057
    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         optimized ${PROJECT_NAME} debug ${PROJECT_NAME}_d
    71     )
    72     target_link_libraries(Test${PROJECT_NAME}
    73         ${LIBS}
    74     )
    75     pacpus_install(Test${PROJECT_NAME})
    76     install(DIRECTORY test/data
    77         DESTINATION ${PACPUS_INSTALL_DIR}/bin
    78     )
    79 endif()
    80 
    8158################################################################################
    82 # Install
     59# INSTALL
    8360pacpus_install(${PROJECT_NAME})
     61install(DIRECTORY data
     62    DESTINATION ${PACPUS_INSTALL_DIR}/bin
     63)
    8464
    8565################################################################################
    8666# FOLDER
    87 pacpus_folder(${PROJECT_NAME} "libraries")
     67pacpus_folder(${PROJECT_NAME} "tests")
Note: See TracChangeset for help on using the changeset viewer.