|
|
|
@ -289,62 +289,79 @@ if ( WIN32 )
|
|
|
|
|
set(library_SRCS ${library_SRCS} ${RES_FILES})
|
|
|
|
|
endif( WIN32 )
|
|
|
|
|
|
|
|
|
|
add_library (iec61850-shared SHARED ${library_SRCS} )
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
add_library (iec61850-shared SHARED ${library_SRCS} )
|
|
|
|
|
|
|
|
|
|
set_target_properties(iec61850-shared PROPERTIES
|
|
|
|
|
OUTPUT_NAME iec61850
|
|
|
|
|
SOVERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_compile_definitions(iec61850-shared PRIVATE EXPORT_FUNCTIONS_FOR_DLL)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(iec61850-shared
|
|
|
|
|
hal-shared
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
GENERATE_EXPORT_HEADER(iec61850-shared
|
|
|
|
|
BASE_NAME iec61850-shared
|
|
|
|
|
EXPORT_MACRO_NAME iec61850-shared_EXPORT
|
|
|
|
|
EXPORT_FILE_NAME iec61850-shared_export.h
|
|
|
|
|
STATIC_DEFINE iec61850-shared_BUILT_AS_STATIC
|
|
|
|
|
)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
add_library (iec61850 STATIC ${library_SRCS})
|
|
|
|
|
|
|
|
|
|
target_link_libraries(iec61850
|
|
|
|
|
hal
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
|
IF (CONFIG_SYSTEM_HAS_CLOCK_GETTIME)
|
|
|
|
|
target_link_libraries (iec61850
|
|
|
|
|
-lpthread
|
|
|
|
|
-lm
|
|
|
|
|
-lrt
|
|
|
|
|
)
|
|
|
|
|
ELSE ()
|
|
|
|
|
target_link_libraries (iec61850
|
|
|
|
|
-lpthread
|
|
|
|
|
-lm
|
|
|
|
|
)
|
|
|
|
|
ENDIF (CONFIG_SYSTEM_HAS_CLOCK_GETTIME)
|
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
|
|
|
|
|
set_target_properties(iec61850-shared PROPERTIES
|
|
|
|
|
OUTPUT_NAME iec61850
|
|
|
|
|
SOVERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_compile_definitions(iec61850-shared PRIVATE EXPORT_FUNCTIONS_FOR_DLL)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(iec61850-shared
|
|
|
|
|
hal-shared
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
GENERATE_EXPORT_HEADER(iec61850-shared
|
|
|
|
|
BASE_NAME iec61850-shared
|
|
|
|
|
EXPORT_MACRO_NAME iec61850-shared_EXPORT
|
|
|
|
|
EXPORT_FILE_NAME iec61850-shared_export.h
|
|
|
|
|
STATIC_DEFINE iec61850-shared_BUILT_AS_STATIC
|
|
|
|
|
)
|
|
|
|
|
IF(MINGW)
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
target_link_libraries(iec61850-shared ws2_32 iphlpapi)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
|
|
|
|
|
add_library (iec61850 STATIC ${library_SRCS})
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
target_link_libraries(iec61850 ws2_32 iphlpapi)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
ENDIF(MINGW)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(iec61850
|
|
|
|
|
hal
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
|
IF (CONFIG_SYSTEM_HAS_CLOCK_GETTIME)
|
|
|
|
|
target_link_libraries (iec61850
|
|
|
|
|
-lpthread
|
|
|
|
|
-lm
|
|
|
|
|
-lrt
|
|
|
|
|
)
|
|
|
|
|
ELSE ()
|
|
|
|
|
target_link_libraries (iec61850
|
|
|
|
|
-lpthread
|
|
|
|
|
-lm
|
|
|
|
|
)
|
|
|
|
|
ENDIF (CONFIG_SYSTEM_HAS_CLOCK_GETTIME)
|
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
IF(MINGW)
|
|
|
|
|
target_link_libraries(iec61850-shared ws2_32 iphlpapi)
|
|
|
|
|
target_link_libraries(iec61850 ws2_32 iphlpapi)
|
|
|
|
|
ENDIF(MINGW)
|
|
|
|
|
|
|
|
|
|
iF(WITH_WPCAP)
|
|
|
|
|
target_link_libraries(iec61850
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/packet.lib
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(iec61850-shared
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/packet.lib
|
|
|
|
|
)
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
target_link_libraries(iec61850
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/packet.lib
|
|
|
|
|
)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
target_link_libraries(iec61850-shared
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/packet.lib
|
|
|
|
|
)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
ENDIF(WITH_WPCAP)
|
|
|
|
|
|
|
|
|
|
find_package(Doxygen)
|
|
|
|
|
if(DOXYGEN_FOUND)
|
|
|
|
|
configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
|
|
|
@ -370,9 +387,18 @@ if(UNIX)
|
|
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libiec61850.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pkgconfig")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
install (TARGETS iec61850 iec61850-shared
|
|
|
|
|
RUNTIME DESTINATION ${BINDIR} COMPONENT Applications
|
|
|
|
|
ARCHIVE DESTINATION ${LIBDIR} COMPONENT Libraries
|
|
|
|
|
LIBRARY DESTINATION ${LIBDIR} COMPONENT Libraries
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
install (TARGETS iec61850
|
|
|
|
|
RUNTIME DESTINATION ${BINDIR} COMPONENT Applications
|
|
|
|
|
ARCHIVE DESTINATION ${LIBDIR} COMPONENT Libraries
|
|
|
|
|
LIBRARY DESTINATION ${LIBDIR} COMPONENT Libraries
|
|
|
|
|
)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_STATIC)
|
|
|
|
|
|
|
|
|
|
if (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|
install (TARGETS iec61850-shared
|
|
|
|
|
RUNTIME DESTINATION ${BINDIR} COMPONENT Applications
|
|
|
|
|
ARCHIVE DESTINATION ${LIBDIR} COMPONENT Libraries
|
|
|
|
|
LIBRARY DESTINATION ${LIBDIR} COMPONENT Libraries
|
|
|
|
|
)
|
|
|
|
|
endif (CONFIG_IEC61850_IEC61850_SHARED)
|
|
|
|
|