@@ -141,31 +141,31 @@ else (JRTPLIB_STDINT)
141
141
if (JRTPLIB_INTTYPES )
142
142
set (RTP_INTTYPE_HEADERS "#include <inttypes.h>\n #include <sys/types.h>\n " )
143
143
else (JRTPLIB_INTTYPES )
144
- if (NOT UNIX AND WIN32 )
144
+ if (MSVC )
145
145
set (RTP_INTTYPE_HEADERS "#include \" rtptypes_win.h\" " )
146
- else (NOT UNIX AND WIN32 )
146
+ else (MSVC )
147
147
set (RTP_INTTYPE_HEADERS "#error Could not find header files that define types like 'uint32_t'. Please edit the file ${PROJECT_BINARY_DIR} /src/rtptypes_unix.h and make sure that the following types are defined: int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t" )
148
148
message ("\n\n Error: Could not find header files that define types like 'uint32_t'.\n Please edit the file ${PROJECT_BINARY_DIR} /src/rtptypes_unix.h\n and make sure that the following types are defined: \n int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t\n\n " )
149
- endif (NOT UNIX AND WIN32 )
149
+ endif (MSVC )
150
150
endif (JRTPLIB_INTTYPES )
151
151
endif (JRTPLIB_STDINT )
152
152
153
153
if (RTP_SOCKETTYPE_WINSOCK )
154
154
set (RTP_WINSOCK_HEADERS "#ifdef RTP_SOCKETTYPE_WINSOCK\n #include <winsock2.h> \n #include <ws2tcpip.h>\n #ifndef _WIN32_WCE\n #include <sys/types.h>\n #endif // _WIN32_WCE\n #endif // RTP_SOCKETTYPE_WINSOCK\n " )
155
155
endif (RTP_SOCKETTYPE_WINSOCK )
156
156
157
- if (NOT UNIX )
157
+ if (MSVC )
158
158
set (JRTPLIB_COMPILE_STATIC ON CACHE BOOL "Flag indicating if a static library should be built, or a dynamic one" )
159
159
list (APPEND JRTPLIB_LINK_LIBS "ws2_32" )
160
- endif (NOT UNIX )
160
+ endif ()
161
161
162
- if (UNIX OR JRTPLIB_COMPILE_STATIC )
162
+ if (NOT MSVC OR JRTPLIB_COMPILE_STATIC )
163
163
set (JRTPLIB_IMPORT "" )
164
164
set (JRTPLIB_EXPORT "" )
165
- else (UNIX OR JRTPLIB_COMPILE_STATIC )
165
+ else ()
166
166
set (JRTPLIB_IMPORT "__declspec(dllimport)" )
167
167
set (JRTPLIB_EXPORT "__declspec(dllexport)" )
168
- endif (UNIX OR JRTPLIB_COMPILE_STATIC )
168
+ endif ()
169
169
170
170
configure_file ("${PROJECT_SOURCE_DIR} /src/rtptypes.h.in" "${PROJECT_BINARY_DIR} /src/rtptypes.h" )
171
171
configure_file ("${PROJECT_SOURCE_DIR} /src/rtpconfig.h.in" "${PROJECT_BINARY_DIR} /src/rtpconfig.h" )
@@ -180,12 +180,12 @@ if (JRTPLIB_COMPILE_TESTS)
180
180
add_subdirectory (tests )
181
181
endif ()
182
182
183
- if (UNIX )
183
+ if (NOT MSVC )
184
184
set (JRTPLIB_LIBS "-L${LIBRARY_INSTALL_DIR} " "-ljrtp" )
185
- else (UNIX )
185
+ else ()
186
186
set (JRTPLIB_LIBS optimized "${LIBRARY_INSTALL_DIR} /jrtplib.lib"
187
187
debug "${LIBRARY_INSTALL_DIR} /jrtplib_d.lib" )
188
- endif (UNIX )
188
+ endif ()
189
189
190
190
set (JRTPLIB_INCDIRS ${JRTPLIB_EXTERNAL_INCLUDES} ${CMAKE_INSTALL_PREFIX} /include )
191
191
set (JRTPLIB_LIBS ${JRTPLIB_LIBS} ${JRTPLIB_LINK_LIBS} )
@@ -203,7 +203,7 @@ endforeach()
203
203
configure_file ("${PROJECT_SOURCE_DIR} /cmake/JRTPLIBConfig.cmake.in" "${PROJECT_BINARY_DIR} /cmake/JRTPLIBConfig.cmake" )
204
204
install (FILES "${PROJECT_BINARY_DIR} /cmake/JRTPLIBConfig.cmake" DESTINATION ${LIBRARY_INSTALL_DIR} /cmake/JRTPLIB )
205
205
206
- if (UNIX )
206
+ if (NOT MSVC )
207
207
foreach (ARG ${JRTPLIB_LIBS} )
208
208
set (JRTPLIB_LIBS_PKGCONFIG "${JRTPLIB_LIBS_PKGCONFIG} ${ARG} " )
209
209
endforeach ()
@@ -213,6 +213,6 @@ if (UNIX)
213
213
214
214
configure_file (${PROJECT_SOURCE_DIR} /pkgconfig/jrtplib.pc.in ${PROJECT_BINARY_DIR} /pkgconfig/jrtplib.pc )
215
215
install (FILES ${PROJECT_BINARY_DIR} /pkgconfig/jrtplib.pc DESTINATION ${LIBRARY_INSTALL_DIR} /pkgconfig )
216
- endif (UNIX )
216
+ endif ()
217
217
218
218
0 commit comments