diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index ef38ac32..bca02760 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -1409,6 +1409,7 @@ if(MSVC) ${PNG_LIBRARY} ${JPEG_LIBRARY} ${GLEW_LIBRARY} + ${CMAKE_DL_LIBS} ) #CMAKE_BINARY_DIR @@ -1565,15 +1566,10 @@ else() set(RT_LIBRARY rt) endif() - if(NOT "${CMAKE_SYSTEM}" MATCHES "FreeBSD") - set(DL_LIBRARY dl) - endif() - target_link_libraries(RBDoom3BFG idlib ${OPENGL_LIBRARIES} pthread - ${DL_LIBRARY} ${RT_LIBRARY} ${SDLx_LIBRARY} ${OPENAL_LIBRARY} @@ -1582,6 +1578,7 @@ else() ${PNG_LIBRARY} ${JPEG_LIBRARY} ${GLEW_LIBRARY} + ${CMAKE_DL_LIBS} ) endif() diff --git a/neo/idlib/sys/sys_defines.h b/neo/idlib/sys/sys_defines.h index 3daa5e59..1e1c0e54 100644 --- a/neo/idlib/sys/sys_defines.h +++ b/neo/idlib/sys/sys_defines.h @@ -102,7 +102,7 @@ If you have questions concerning this license or the applicable additional terms #endif -#elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__GNUC__) || defined(__clang__) #if defined(__i386__) #define CPUSTRING "x86" @@ -116,6 +116,8 @@ If you have questions concerning this license or the applicable additional terms #define BUILD_STRING "linux-" CPUSTRING #elif defined(__APPLE__) #define BUILD_STRING "osx-" CPUSTRING +#else +#define BUILD_STRING "other-" CPUSTRING #endif #define _alloca alloca @@ -146,6 +148,8 @@ If you have questions concerning this license or the applicable additional terms #define CALLBACK #define __cdecl +#else +#error unknown build enviorment #endif // RB end