early-access version 2853
This commit is contained in:
61
externals/vcpkg/ports/cunit/CMakeLists.txt
vendored
Executable file
61
externals/vcpkg/ports/cunit/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,61 @@
|
||||
cmake_minimum_required (VERSION 3.8.0)
|
||||
project (libcunit C)
|
||||
|
||||
set(HEADERS_DIR "${PROJECT_SOURCE_DIR}/CUnit/Headers")
|
||||
set(SOURCES_DIR "${PROJECT_SOURCE_DIR}/CUnit/Sources")
|
||||
set(EXAMPLES_DIR "${PROJECT_SOURCE_DIR}/Examples")
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 -D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${HEADERS_DIR}/CUnit.h.in"
|
||||
"${PROJECT_BINARY_DIR}/CUnit.h"
|
||||
)
|
||||
|
||||
file(READ "${PROJECT_BINARY_DIR}/CUnit.h" CUNIT_H)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
string(REPLACE "ifdef CU_DLL" "if 1" CUNIT_H "${CUNIT_H}")
|
||||
else()
|
||||
string(REPLACE "ifdef CU_DLL" "if 0" CUNIT_H "${CUNIT_H}")
|
||||
endif()
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/CUnit.h" "${CUNIT_H}")
|
||||
|
||||
include_directories("${PROJECT_BINARY_DIR}")
|
||||
include_directories(${HEADERS_DIR})
|
||||
|
||||
add_library(libcunit
|
||||
"${SOURCES_DIR}/Automated/Automated.c"
|
||||
"${SOURCES_DIR}/Basic/Basic.c"
|
||||
"${SOURCES_DIR}/Console/Console.c"
|
||||
"${SOURCES_DIR}/Framework/CUError.c"
|
||||
"${SOURCES_DIR}/Framework/MyMem.c"
|
||||
"${SOURCES_DIR}/Framework/TestDB.c"
|
||||
"${SOURCES_DIR}/Framework/TestRun.c"
|
||||
"${SOURCES_DIR}/Framework/Util.c"
|
||||
)
|
||||
target_compile_definitions(libcunit PRIVATE -DCU_BUILD_DLL)
|
||||
|
||||
if(BUILD_EXAMPLES)
|
||||
include_directories(${EXAMPLES_DIR})
|
||||
add_executable(AutomatedTest ${EXAMPLES_DIR}/AutomatedTest/AutomatedTest.c "${EXAMPLES_DIR}/ExampleTests.c")
|
||||
add_executable(BasicTest ${EXAMPLES_DIR}/BasicTest/BasicTest.c "${EXAMPLES_DIR}/ExampleTests.c")
|
||||
add_executable(ConsoleTest ${EXAMPLES_DIR}/ConsoleTest/ConsoleTest.c "${EXAMPLES_DIR}/ExampleTests.c")
|
||||
|
||||
target_link_libraries(AutomatedTest libcunit)
|
||||
target_link_libraries(BasicTest libcunit)
|
||||
target_link_libraries(ConsoleTest libcunit)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS libcunit
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(DIRECTORY "${HEADERS_DIR}/" DESTINATION include/cunit FILES_MATCHING PATTERN "*.h")
|
||||
install(FILES "${PROJECT_BINARY_DIR}/CUnit.h" DESTINATION include/cunit)
|
||||
endif()
|
||||
21
externals/vcpkg/ports/cunit/portfile.cmake
vendored
Executable file
21
externals/vcpkg/ports/cunit/portfile.cmake
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO cunit/CUnit
|
||||
REF 2.1-3
|
||||
FILENAME "CUnit-2.1-3.tar.bz2"
|
||||
SHA512 547b417109332446dfab8fda17bf4ccd2da841dc93f824dc90a20635bcf1fb80fb2176500d8a0906940f3f3d3e2f77b2d70a71090c9ab84ad9af43f3582bc487
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
7
externals/vcpkg/ports/cunit/vcpkg.json
vendored
Executable file
7
externals/vcpkg/ports/cunit/vcpkg.json
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "cunit",
|
||||
"version-string": "2.1.3",
|
||||
"port-version": 7,
|
||||
"description": "CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces",
|
||||
"homepage": "https://sourceforge.net/projects/cunit/"
|
||||
}
|
||||
Reference in New Issue
Block a user