-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
executable file
·52 lines (39 loc) · 1.89 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
######################################################
# #
# Copyright (c) 2020, Rockwell Automation, Inc. #
# All rights reserved. #
# #
######################################################
project( CIP_ELECTRICAL_ENERGY_OBJECT LANGUAGES C VERSION 3.0)
opener_add_cip_object( ${PROJECT_NAME} "Electrical Energy Object (class 0x4F)")
#######################################
# Add common includes #
#######################################
opener_common_includes()
#######################################
# Add platform-specific includes #
#######################################
opener_platform_support("INCLUDES")
include_directories(${CIP_BASE_ENERGY_OBJECT_SOURCE_DIR})
############################
# Conditions
#############################
if( OPENER_MESSAGE_DATA_REPLY_BUFFER LESS 250 )
message(STATUS "The Electrical Energy Object needs a larger reply message buffer - value set to 250")
set( OPENER_MESSAGE_DATA_REPLY_BUFFER "250" CACHE STRING "The number of bytes used for the reply message buffer" FORCE)
endif()
##################################
# Set source for library #
##################################
set( ${PROJECT_NAME}_SOURCE cipelectricalenergy.c )
include_directories(${${PROJECT_NAME}_SOURCE_DIR})
##################################
# Create library #
##################################
add_library( ${PROJECT_NAME} ${${PROJECT_NAME}_SOURCE})
##################################
# Add object to includes #
##################################
string(STRIP "${OpENer_ADD_CIP_OBJECTS} ${PROJECT_NAME}" OpENer_TRIMMED_ADD_CIP_OBJECTS)
set(OpENer_ADD_CIP_OBJECTS "${OpENer_TRIMMED_ADD_CIP_OBJECTS}" CACHE INTERNAL STRING )
target_link_libraries( ${PROJECT_NAME} CIP m)