Commit 61b89dbe authored by Yuelong Yu's avatar Yuelong Yu
Browse files

added pkg-config file and version info

parent b893e54e
......@@ -12,7 +12,7 @@ set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
message(STATUS "library output path is:${LIBRARY_OUTPUT_PATH}")
#install path
set(CMAKE_INSTALL_LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib/pcosdk")
set(CMAKE_INSTALL_LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_INC_PATH "${CMAKE_INSTALL_PREFIX}/include/pcosdk")
message(STATUS "install path is:${CMAKE_INSTALL_PREFIX}")
......@@ -58,6 +58,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
endif()
set(PKG_LIBS "-L${SISO_LIB_DIRS} -lfglib5 -lclsersis -lhaprt -lpthread")
add_subdirectory("api")
add_subdirectory("pcome4")
add_subdirectory("pcoclhs")
......
configure_file(${CMAKE_MODULE_PATH}/Version.h.cmake
${CMAKE_CURRENT_SOURCE_DIR}/Version.h @ONLY)
set(DEV_HEADERS
PcoInterfaces.h)
PcoInterfaces.h
Version.h)
#install header files
install(FILES ${DEV_HEADERS} DESTINATION "${CMAKE_INSTALL_INC_PATH}")
configure_file(${CMAKE_MODULE_PATH}/pkgconfig.pc.cmake
${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME}.pc @ONLY)
install(FILES ${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIB_PATH}/pkgconfig)
\ No newline at end of file
#pragma once
#include "Version.h"
#include <iostream>
#include <memory>
#include <vector>
......
#pragma once
#include <string>
namespace PcoNS
{
const std::string PCOSDK_VERSION="0.1";
}
set(PCO_SDK_NAME "pcosdk")
set(SDK_LIB_MAIN_VERSION 0)
set(SDK_LIB_MINOR_VERSION 1)
set(SDK_LIBRARY_VERSION "${SDK_LIB_MAIN_VERSION}.${SDK_LIB_MINOR_VERSION}")
set(PCO_SDK_NAME "${PROJECT_NAME}")
set(SDK_LIBRARY_VERSION "${LIBRARY_VERSION}")
include_directories("${PROJECT_SOURCE_DIR}"
${PCOSDK_INC_DIRS}
......
......@@ -3,21 +3,23 @@ find_path(SISO_INC_DIRS NAMES clser.h
PATHS
/usr/include
/usr/local/include
/home/yuelong/lib.local/include/siso560
#/home/yuelong/lib.local/include/siso560
)
#path of pco path
find_library(SISO_LIB_DIRS NAMES fglib5 clsersis haprt
find_library(SISO_LIB_DIRS NAMES fglib5
PATHS
/usr/lib/
/usr/local/lib
/home/yuelong/lib.local/lib/siso560
#/home/yuelong/lib.local/lib/siso560
)
if(SISO_INC_DIRS AND SISO_LIB_DIRS)
SET(SISO_LIB_FOUND TRUE)
endif(SISO_INC_DIRS AND SISO_LIB_DIRS)
#get_filename_component(SISO_INC_DIRS ${SISO_INC_DIRS} DIRECTORY)
get_filename_component(SISO_LIB_DIRS ${SISO_LIB_DIRS} DIRECTORY)
if(NOT SISO_LIB_FOUND)
message(FATAL_ERROR "cannot find corresponding SISO libraries.")
......
#pragma once
#include <string>
namespace PcoNS
{
const std::string PCOSDK_VERSION="@LIBRARY_VERSION@";
}
prefix = @CMAKE_INSTALL_PREFIX@
includedir = ${prefix}/include
libdir = ${prefix}/lib
Name: @PROJECT_NAME@
Description:
URL:
Version: @LIBRARY_VERSION@
Requires:
Libs: -L${libdir} -l@PROJECT_NAME@ @PKG_LIBS@
Cflags: -I${includedir}
\ No newline at end of file
set(PCO_CLHS_NAME "pcoclhs")
set(CLHS_LIB_MAIN_VERSION 0)
set(CLHS_LIB_MINOR_VERSION 1)
set(CLHS_LIBRARY_VERSION "${CLHS_LIB_MAIN_VERSION}.${CLHS_LIB_MINOR_VERSION}")
set(CLHS_LIBRARY_VERSION "${LIBRARY_VERSION}")
include_directories("${PROJECT_SOURCE_DIR}"
${CMAKE_CURRENT_SOURCE_DIR}
......
set(PCO_ME4_NAME "pcome4")
set(ME4_LIB_MAIN_VERSION 0)
set(ME4_LIB_MINOR_VERSION 1)
set(ME4_LIBRARY_VERSION "${ME4_LIB_MAIN_VERSION}.${ME4_LIB_MINOR_VERSION}")
set(ME4_LIBRARY_VERSION "${LIBRARY_VERSION}")
include_directories("${PROJECT_SOURCE_DIR}"
${CMAKE_CURRENT_SOURCE_DIR}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment