diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt index 83df8dc29..61954df39 100644 --- a/source/shared_lib/CMakeLists.txt +++ b/source/shared_lib/CMakeLists.txt @@ -110,60 +110,47 @@ IF(BUILD_MODEL_VIEWER OR BUILD_MAP_EDITOR OR BUILD_ZETAGLEST) FIND_PACKAGE(OpenGL REQUIRED) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY} -lX11) - ENDIF() + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY}) FIND_PACKAGE(X11 REQUIRED) INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${X11_LIBRARIES}) - ENDIF() + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${X11_LIBRARIES}) - IF(WANT_USE_XercesC) - FIND_PACKAGE(XercesC REQUIRED) - INCLUDE_DIRECTORIES(${XERCESC_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${XERCESC_LIBRARY}) - ENDIF() - ENDIF() - - FIND_PACKAGE(OpenAL REQUIRED) - INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENAL_LIBRARY}) - ENDIF() - - FIND_PACKAGE(LUA REQUIRED) - INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS}) - ENDIF() + FIND_PACKAGE(LUA REQUIRED) + INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR}) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS}) FIND_PACKAGE(JPEG REQUIRED) INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${JPEG_LIBRARY}) - ENDIF() + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${JPEG_LIBRARY}) + + FIND_PACKAGE(OpenAL REQUIRED) + INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR}) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENAL_LIBRARY}) FIND_PACKAGE(PNG REQUIRED) INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) - IF(UNIX) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${PNG_LIBRARY}) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${PNG_LIBRARY}) + + IF(WANT_USE_XercesC) + FIND_PACKAGE(XercesC REQUIRED) + INCLUDE_DIRECTORIES(${XERCESC_INCLUDE_DIR}) + IF(UNIX) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${XERCESC_LIBRARY}) + ENDIF() ENDIF() - OPTION(WANT_USE_FontConfig "use the library fontconfig" ON) + OPTION(WANT_USE_FontConfig "use the library fontconfig" ON) IF(WANT_USE_FontConfig) - FIND_PACKAGE(FontConfig) - IF(FONTCONFIG_FOUND) - MESSAGE(STATUS "**NOTE: FontConfig support was detected and enabled.") - SET(HAVE_FONTCONFIG 1) - ADD_DEFINITIONS(-DHAVE_FONTCONFIG) - - INCLUDE_DIRECTORIES( ${FONTCONFIG_INCLUDE_DIR} ) - SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${FONTCONFIG_LIBRARIES} ) - ENDIF(FONTCONFIG_FOUND) - ENDIF() + FIND_PACKAGE(FontConfig) + IF(FONTCONFIG_FOUND) + MESSAGE(STATUS "**NOTE: FontConfig support was detected and enabled.") + SET(HAVE_FONTCONFIG 1) + ADD_DEFINITIONS(-DHAVE_FONTCONFIG) + INCLUDE_DIRECTORIES( ${FONTCONFIG_INCLUDE_DIR} ) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${FONTCONFIG_LIBRARIES} ) + ENDIF(FONTCONFIG_FOUND) + ENDIF() OPTION(WANT_USE_FTGL "Use libFTGL for on-screen fonts (found on your system)" ON) find_package( Freetype REQUIRED)