Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #231 from coldtobi/use_cmake_dl_libs
Do use CMAKE_DL_LIBS to determine the linkerflags needed to link against libdl
  • Loading branch information
RobertBeckebans committed Jun 24, 2015
2 parents edc3dfb + 92dab63 commit 8a8deb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 2 additions & 5 deletions neo/CMakeLists.txt
Expand Up @@ -1409,6 +1409,7 @@ if(MSVC)
${PNG_LIBRARY}
${JPEG_LIBRARY}
${GLEW_LIBRARY}
${CMAKE_DL_LIBS}
)

#CMAKE_BINARY_DIR
Expand Down Expand Up @@ -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}
Expand All @@ -1582,6 +1578,7 @@ else()
${PNG_LIBRARY}
${JPEG_LIBRARY}
${GLEW_LIBRARY}
${CMAKE_DL_LIBS}
)
endif()

Expand Down
6 changes: 5 additions & 1 deletion neo/idlib/sys/sys_defines.h
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 8a8deb6

Please sign in to comment.