2 #Set up visual studio filters
5 SOURCE_GROUP(KDIS FILES ${KDIS_SRC_BASE_H})
6 SOURCE_GROUP(KDIS\\DataTypes FILES ${KDIS_SRC_DATATYPES_H})
7 SOURCE_GROUP(KDIS\\DataTypes\\Enums FILES ${KDIS_SRC_ENUMS_H})
8 SOURCE_GROUP(KDIS\\PDU FILES ${KDIS_SRC_PDU_BASE_H})
9 SOURCE_GROUP(KDIS\\PDU\\Distributed_Emission_Regeneration FILES ${KDIS_SRC_PDU_DER_H})
10 SOURCE_GROUP(KDIS\\PDU\\Entity_Info_Interaction FILES ${KDIS_SRC_PDU_EII_H})
11 SOURCE_GROUP(KDIS\\PDU\\Entity_Management FILES ${KDIS_SRC_PDU_EM_H})
12 SOURCE_GROUP(KDIS\\PDU\\Live_Entity FILES ${KDIS_SRC_PDU_LE_H})
13 SOURCE_GROUP(KDIS\\PDU\\Logistics FILES ${KDIS_SRC_PDU_L_H})
14 SOURCE_GROUP(KDIS\\PDU\\Minefield FILES ${KDIS_SRC_PDU_M_H})
15 SOURCE_GROUP(KDIS\\PDU\\Radio_Communications FILES ${KDIS_SRC_PDU_R_H})
16 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management FILES ${KDIS_SRC_PDU_SM_H})
17 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management_With_Reliability FILES ${KDIS_SRC_PDU_SMWR_H})
18 SOURCE_GROUP(KDIS\\PDU\\Synthetic_Environment FILES ${KDIS_SRC_PDU_SE_H})
19 SOURCE_GROUP(KDIS\\PDU\\Warfare FILES ${KDIS_SRC_PDU_W_H})
20 SOURCE_GROUP(KDIS\\PDU\\Information_Operations FILES ${KDIS_SRC_PDU_IO_H})
21 SOURCE_GROUP(KDIS\\Extras FILES ${KDIS_SRC_EX_H})
22 SOURCE_GROUP(KDIS\\Network FILES ${KDIS_SRC_NET_H})
25 SOURCE_GROUP(KDIS FILES ${KDIS_SRC_BASE_CPP})
26 SOURCE_GROUP(KDIS\\DataTypes FILES ${KDIS_SRC_DATATYPES_CPP})
27 SOURCE_GROUP(KDIS\\DataTypes\\Enums FILES ${KDIS_SRC_ENUMS_CPP})
28 SOURCE_GROUP(KDIS\\PDU FILES ${KDIS_SRC_PDU_BASE_CPP})
29 SOURCE_GROUP(KDIS\\PDU\\Distributed_Emission_Regeneration FILES ${KDIS_SRC_PDU_DER_CPP})
30 SOURCE_GROUP(KDIS\\PDU\\Entity_Info_Interaction FILES ${KDIS_SRC_PDU_EII_CPP})
31 SOURCE_GROUP(KDIS\\PDU\\Entity_Management FILES ${KDIS_SRC_PDU_EM_CPP})
32 SOURCE_GROUP(KDIS\\PDU\\Live_Entity FILES ${KDIS_SRC_PDU_LE_CPP})
33 SOURCE_GROUP(KDIS\\PDU\\Logistics FILES ${KDIS_SRC_PDU_L_CPP})
34 SOURCE_GROUP(KDIS\\PDU\\Minefield FILES ${KDIS_SRC_PDU_M_CPP})
35 SOURCE_GROUP(KDIS\\PDU\\Radio_Communications FILES ${KDIS_SRC_PDU_R_CPP})
36 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management FILES ${KDIS_SRC_PDU_SM_CPP})
37 SOURCE_GROUP(KDIS\\PDU\\Simulation_Management_With_Reliability FILES ${KDIS_SRC_PDU_SMWR_CPP})
38 SOURCE_GROUP(KDIS\\PDU\\Synthetic_Environment FILES ${KDIS_SRC_PDU_SE_CPP})
39 SOURCE_GROUP(KDIS\\PDU\\Warfare FILES ${KDIS_SRC_PDU_W_CPP})
40 SOURCE_GROUP(KDIS\\PDU\\Information_Operations FILES ${KDIS_SRC_PDU_IO_CPP})
41 SOURCE_GROUP(KDIS\\Extras FILES ${KDIS_SRC_EX_CPP})
42 SOURCE_GROUP(KDIS\\Network FILES ${KDIS_SRC_NET_CPP})
44 # Include directories in project settings
45 # (or not, because we don't want to install the Examples in the header files)
47 # INCLUDE_DIRECTORIES(${KDIS_SOURCE_DIR})
48 # INCLUDE_DIRECTORIES(${KDIS_SOURCE_DIR}/Examples)
54 ${KDIS_SRC_DATATYPES_H}
56 ${KDIS_SRC_PDU_BASE_H}
65 ${KDIS_SRC_PDU_SMWR_H}
75 ${KDIS_SRC_DATATYPES_CPP}
77 ${KDIS_SRC_PDU_BASE_CPP}
78 ${KDIS_SRC_PDU_DER_CPP}
79 ${KDIS_SRC_PDU_EII_CPP}
80 ${KDIS_SRC_PDU_EM_CPP}
81 ${KDIS_SRC_PDU_LE_CPP}
85 ${KDIS_SRC_PDU_SM_CPP}
86 ${KDIS_SRC_PDU_SMWR_CPP}
87 ${KDIS_SRC_PDU_SE_CPP}
89 ${KDIS_SRC_PDU_IO_CPP}
94 SET(KDIS_FILES ${KDIS_FILES_CPP} ${KDIS_FILES_H})
96 ADD_LIBRARY(KDIS_LIB STATIC ${KDIS_FILES})
98 SET_PROPERTY(TARGET KDIS_LIB PROPERTY FOLDER "Builds/")
100 #Lower the warning level
105 IF(DIS_VERSION MATCHES 6)
106 ADD_DEFINITIONS(-D "DIS_VERSION=6")
107 ENDIF(DIS_VERSION MATCHES 6)
109 IF(DIS_VERSION MATCHES 5)
110 ADD_DEFINITIONS(-D "DIS_VERSION=5")
111 ENDIF(DIS_VERSION MATCHES 5)
113 IF(DIS_VERSION MATCHES 7)
114 ADD_DEFINITIONS(-D "DIS_VERSION=7")
115 ENDIF(DIS_VERSION MATCHES 7)
117 IF(KDIS_USE_ENUM_DESCRIPTORS)
118 ADD_DEFINITIONS(-D "KDIS_USE_ENUM_DESCRIPTORS")
119 ENDIF(KDIS_USE_ENUM_DESCRIPTORS)
121 IF(CMAKE_SYSTEM MATCHES "Linux")
122 TARGET_LINK_LIBRARIES(KDIS_LIB ${RT_LIBRARY})
123 ENDIF(CMAKE_SYSTEM MATCHES "Linux")
126 TARGET_LINK_LIBRARIES(KDIS_LIB "ws2_32")
129 SET_TARGET_PROPERTIES(KDIS_LIB PROPERTIES OUTPUT_NAME "kdis")
131 # INSTALL(DIRECTORY ../../../KDIS
132 # DESTINATION "include"
133 # FILES_MATCHING PATTERN *.h
134 # PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
136 INSTALL(FILES ${KDIS_SRC_BASE_H} DESTINATION include/${BASE_DIRNAME})
137 INSTALL(FILES ${KDIS_SRC_DATATYPES_H} DESTINATION include/${BASE_DIRNAME}/${DATATYPES_DIRNAME})
138 INSTALL(FILES ${KDIS_SRC_ENUMS_H} DESTINATION include/${BASE_DIRNAME}/${ENUMS_DIRNAME})
139 INSTALL(FILES ${KDIS_SRC_EX_H} DESTINATION include/${BASE_DIRNAME}/${EX_DIRNAME})
140 INSTALL(FILES ${KDIS_SRC_NET_H} DESTINATION include/${BASE_DIRNAME}/${NET_DIRNAME})
141 INSTALL(FILES ${KDIS_SRC_PDU_BASE_H} DESTINATION include/${BASE_DIRNAME}/${PDU_BASE_DIRNAME})
142 INSTALL(FILES ${KDIS_SRC_PDU_DER_H} DESTINATION include/${BASE_DIRNAME}/${PDU_DER_DIRNAME})
143 INSTALL(FILES ${KDIS_SRC_PDU_EII_H} DESTINATION include/${BASE_DIRNAME}/${PDU_EII_DIRNAME})
144 INSTALL(FILES ${KDIS_SRC_PDU_EM_H} DESTINATION include/${BASE_DIRNAME}/${PDU_EM_DIRNAME})
145 INSTALL(FILES ${KDIS_SRC_PDU_IO_H} DESTINATION include/${BASE_DIRNAME}/${PDU_IO_DIRNAME})
146 INSTALL(FILES ${KDIS_SRC_PDU_L_H} DESTINATION include/${BASE_DIRNAME}/${PDU_L_DIRNAME})
147 INSTALL(FILES ${KDIS_SRC_PDU_LE_H} DESTINATION include/${BASE_DIRNAME}/${PDU_LE_DIRNAME})
148 INSTALL(FILES ${KDIS_SRC_PDU_M_H} DESTINATION include/${BASE_DIRNAME}/${PDU_M_DIRNAME})
149 INSTALL(FILES ${KDIS_SRC_PDU_R_H} DESTINATION include/${BASE_DIRNAME}/${PDU_R_DIRNAME})
150 INSTALL(FILES ${KDIS_SRC_PDU_SE_H} DESTINATION include/${BASE_DIRNAME}/${PDU_SE_DIRNAME})
151 INSTALL(FILES ${KDIS_SRC_PDU_SM_H} DESTINATION include/${BASE_DIRNAME}/${PDU_SM_DIRNAME})
152 INSTALL(FILES ${KDIS_SRC_PDU_SMWR_H} DESTINATION include/${BASE_DIRNAME}/${PDU_SMWR_DIRNAME})
153 INSTALL(FILES ${KDIS_SRC_PDU_W_H} DESTINATION include/${BASE_DIRNAME}/${PDU_W_DIRNAME})
155 #INSTALL(FILES ${KDIS_FILES_H} DESTINATION include/KDIS)
157 INSTALL(TARGETS KDIS_LIB
158 ARCHIVE DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}
159 LIBRARY DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}