1 #Set up visual studio filters
4 SOURCE_GROUP(KDIS FILES ${KDIS_SRC_BASE_H})
5 SOURCE_GROUP(KDIS\\DataTypes FILES ${KDIS_SRC_DATATYPES_H})
6 SOURCE_GROUP(KDIS\\DataTypes\\Enums FILES ${KDIS_SRC_ENUMS_H})
7 SOURCE_GROUP(KDIS\\PDU FILES ${KDIS_SRC_PDU_BASE_H})
8 SOURCE_GROUP(KDIS\\PDU\\Distributed_Emission_Regeneration FILES ${KDIS_SRC_PDU_DER_H})
9 SOURCE_GROUP(KDIS\\PDU\\Entity_Info_Interaction FILES ${KDIS_SRC_PDU_EII_H})
10 SOURCE_GROUP(KDIS\\PDU\\Entity_Management FILES ${KDIS_SRC_PDU_EM_H})
11 SOURCE_GROUP(KDIS\\PDU\\Live_Entity FILES ${KDIS_SRC_PDU_LE_H})
12 SOURCE_GROUP(KDIS\\PDU\\Logistics FILES ${KDIS_SRC_PDU_L_H})
13 SOURCE_GROUP(KDIS\\PDU\\Minefield FILES ${KDIS_SRC_PDU_M_H})
14 SOURCE_GROUP(KDIS\\PDU\\Radio_Communications FILES ${KDIS_SRC_PDU_R_H})
15 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management FILES ${KDIS_SRC_PDU_SM_H})
16 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management_With_Reliability FILES ${KDIS_SRC_PDU_SMWR_H})
17 SOURCE_GROUP(KDIS\\PDU\\Synthetic_Environment FILES ${KDIS_SRC_PDU_SE_H})
18 SOURCE_GROUP(KDIS\\PDU\\Warfare FILES ${KDIS_SRC_PDU_W_H})
19 SOURCE_GROUP(KDIS\\PDU\\Information_Operations FILES ${KDIS_SRC_PDU_IO_H})
20 SOURCE_GROUP(KDIS\\Extras FILES ${KDIS_SRC_EX_H})
21 SOURCE_GROUP(KDIS\\Network FILES ${KDIS_SRC_NET_H})
24 SOURCE_GROUP(KDIS FILES ${KDIS_SRC_BASE_CPP})
25 SOURCE_GROUP(KDIS\\DataTypes FILES ${KDIS_SRC_DATATYPES_CPP})
26 SOURCE_GROUP(KDIS\\DataTypes\\Enums FILES ${KDIS_SRC_ENUMS_CPP})
27 SOURCE_GROUP(KDIS\\PDU FILES ${KDIS_SRC_PDU_BASE_CPP})
28 SOURCE_GROUP(KDIS\\PDU\\Distributed_Emission_Regeneration FILES ${KDIS_SRC_PDU_DER_CPP})
29 SOURCE_GROUP(KDIS\\PDU\\Entity_Info_Interaction FILES ${KDIS_SRC_PDU_EII_CPP})
30 SOURCE_GROUP(KDIS\\PDU\\Entity_Management FILES ${KDIS_SRC_PDU_EM_CPP})
31 SOURCE_GROUP(KDIS\\PDU\\Live_Entity FILES ${KDIS_SRC_PDU_LE_CPP})
32 SOURCE_GROUP(KDIS\\PDU\\Logistics FILES ${KDIS_SRC_PDU_L_CPP})
33 SOURCE_GROUP(KDIS\\PDU\\Minefield FILES ${KDIS_SRC_PDU_M_CPP})
34 SOURCE_GROUP(KDIS\\PDU\\Radio_Communications FILES ${KDIS_SRC_PDU_R_CPP})
35 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management FILES ${KDIS_SRC_PDU_SM_CPP})
36 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management_With_Reliability FILES ${KDIS_SRC_PDU_SMWR_CPP})
37 SOURCE_GROUP(KDIS\\PDU\\Synthetic_Environment FILES ${KDIS_SRC_PDU_SE_CPP})
38 SOURCE_GROUP(KDIS\\PDU\\Warfare FILES ${KDIS_SRC_PDU_W_CPP})
39 SOURCE_GROUP(KDIS\\PDU\\Information_Operations FILES ${KDIS_SRC_PDU_IO_CPP})
40 SOURCE_GROUP(KDIS\\Extras FILES ${KDIS_SRC_EX_CPP})
41 SOURCE_GROUP(KDIS\\Network FILES ${KDIS_SRC_NET_CPP})
43 #Include directories in project settings
44 INCLUDE_DIRECTORIES(${KDIS_SOURCE_DIR})
45 INCLUDE_DIRECTORIES(${KDIS_SOURCE_DIR}/Examples)
51 ${KDIS_SRC_DATATYPES_H}
53 ${KDIS_SRC_PDU_BASE_H}
62 ${KDIS_SRC_PDU_SMWR_H}
73 ${KDIS_SRC_DATATYPES_CPP}
75 ${KDIS_SRC_PDU_BASE_CPP}
76 ${KDIS_SRC_PDU_DER_CPP}
77 ${KDIS_SRC_PDU_EII_CPP}
78 ${KDIS_SRC_PDU_EM_CPP}
79 ${KDIS_SRC_PDU_LE_CPP}
83 ${KDIS_SRC_PDU_SM_CPP}
84 ${KDIS_SRC_PDU_SMWR_CPP}
85 ${KDIS_SRC_PDU_SE_CPP}
87 ${KDIS_SRC_PDU_IO_CPP}
92 SET(KDIS_FILES ${KDIS_FILES_CPP} ${KDIS_FILES_H})
94 ADD_LIBRARY(KDIS_DLL SHARED ${KDIS_FILES})
96 SET_PROPERTY(TARGET KDIS_DLL PROPERTY FOLDER "Builds/")
99 set(KDIS_VERSION_MAJOR 2)
100 set(KDIS_VERSION_MINOR 9)
101 set(KDIS_VERSION_PATCH 0)
102 set(KDIS_SOVERSION 1)
103 set(KDIS_VERSION ${KDIS_VERSION_MAJOR}.${KDIS_VERSION_MINOR}.${KDIS_VERSION_PATCH})
105 set_target_properties(KDIS_DLL PROPERTIES SOVERSION ${KDIS_SOVERSION})
106 set_target_properties(KDIS_DLL PROPERTIES VERSION ${KDIS_VERSION})
108 #Lower the warning level
113 ADD_DEFINITIONS(-D "EXPORT_KDIS")
115 IF(DIS_VERSION MATCHES 6)
116 ADD_DEFINITIONS(-D "DIS_VERSION=6")
117 ENDIF(DIS_VERSION MATCHES 6)
119 IF(DIS_VERSION MATCHES 5)
120 ADD_DEFINITIONS(-D "DIS_VERSION=5")
121 ENDIF(DIS_VERSION MATCHES 5)
123 IF(DIS_VERSION MATCHES 7)
124 ADD_DEFINITIONS(-D "DIS_VERSION=7")
125 ENDIF(DIS_VERSION MATCHES 7)
127 IF(KDIS_USE_ENUM_DESCRIPTORS)
128 ADD_DEFINITIONS(-D "KDIS_USE_ENUM_DESCRIPTORS")
129 ENDIF(KDIS_USE_ENUM_DESCRIPTORS)
131 IF(CMAKE_SYSTEM MATCHES "Linux")
132 TARGET_LINK_LIBRARIES(KDIS_DLL ${RT_LIBRARY})
133 ENDIF(CMAKE_SYSTEM MATCHES "Linux")
136 TARGET_LINK_LIBRARIES(KDIS_DLL "ws2_32")
139 SET_TARGET_PROPERTIES(KDIS_DLL PROPERTIES OUTPUT_NAME "kdis" SOVERSION 0)
141 # INSTALL(DIRECTORY ../../../KDIS
142 # DESTINATION "include"
143 # FILES_MATCHING PATTERN *.h
144 # PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
146 INSTALL(FILES ${KDIS_SRC_BASE_H} DESTINATION include/${BASE_DIRNAME})
147 INSTALL(FILES ${KDIS_SRC_DATATYPES_H} DESTINATION include/${BASE_DIRNAME}/${DATATYPES_DIRNAME})
148 INSTALL(FILES ${KDIS_SRC_ENUMS_H} DESTINATION include/${BASE_DIRNAME}/${ENUMS_DIRNAME})
149 INSTALL(FILES ${KDIS_SRC_EX_H} DESTINATION include/${BASE_DIRNAME}/${EX_DIRNAME})
150 INSTALL(FILES ${KDIS_SRC_NET_H} DESTINATION include/${BASE_DIRNAME}/${NET_DIRNAME})
151 INSTALL(FILES ${KDIS_SRC_PDU_BASE_H} DESTINATION include/${BASE_DIRNAME}/${PDU_BASE_DIRNAME})
152 INSTALL(FILES ${KDIS_SRC_PDU_DER_H} DESTINATION include/${BASE_DIRNAME}/${PDU_DER_DIRNAME})
153 INSTALL(FILES ${KDIS_SRC_PDU_EII_H} DESTINATION include/${BASE_DIRNAME}/${PDU_EII_DIRNAME})
154 INSTALL(FILES ${KDIS_SRC_PDU_EM_H} DESTINATION include/${BASE_DIRNAME}/${PDU_EM_DIRNAME})
155 INSTALL(FILES ${KDIS_SRC_PDU_IO_H} DESTINATION include/${BASE_DIRNAME}/${PDU_IO_DIRNAME})
156 INSTALL(FILES ${KDIS_SRC_PDU_L_H} DESTINATION include/${BASE_DIRNAME}/${PDU_L_DIRNAME})
157 INSTALL(FILES ${KDIS_SRC_PDU_LE_H} DESTINATION include/${BASE_DIRNAME}/${PDU_LE_DIRNAME})
158 INSTALL(FILES ${KDIS_SRC_PDU_M_H} DESTINATION include/${BASE_DIRNAME}/${PDU_M_DIRNAME})
159 INSTALL(FILES ${KDIS_SRC_PDU_R_H} DESTINATION include/${BASE_DIRNAME}/${PDU_R_DIRNAME})
160 INSTALL(FILES ${KDIS_SRC_PDU_SE_H} DESTINATION include/${BASE_DIRNAME}/${PDU_SE_DIRNAME})
161 INSTALL(FILES ${KDIS_SRC_PDU_SM_H} DESTINATION include/${BASE_DIRNAME}/${PDU_SM_DIRNAME})
162 INSTALL(FILES ${KDIS_SRC_PDU_SMWR_H} DESTINATION include/${BASE_DIRNAME}/${PDU_SMWR_DIRNAME})
163 INSTALL(FILES ${KDIS_SRC_PDU_W_H} DESTINATION include/${BASE_DIRNAME}/${PDU_W_DIRNAME})
165 INSTALL(TARGETS KDIS_DLL
166 ARCHIVE DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}
167 LIBRARY DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}