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