Skip to content

Commit

Permalink
CMake: refactoring projects dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg authored and Xottab-DUTY committed Jul 24, 2018
1 parent 29a2ffe commit dc31802
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/xrCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/pugixml/src
${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include
/usr/include/SDL2
${SDL_INCLUDE_DIR}
)

add_definitions(-DXRCORE_EXPORTS)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})

set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
#this is a temporary solution until find_package will not be fixed
set(CRYPTO_LIBRARY crypto++)
set(PUGIXML_LIBRARY pugixml)
set(TBB_LIBRARIES tbb tbbmalloc_proxy tbbmalloc)
set(SDL2_LIB SDL2)

target_link_libraries(${PROJECT_NAME} ${SDL2_LIB} ${LZO_LIBRARY} ${CRYPTO_LIBRARY} ${PUGIXML_LIBRARY} ${TBB_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${SDL_LIBRARIES} ${LZO_LIBRARY} ${CRYPTO++_LIBRARIES} ${PUGIXML_LIBRARY} ${TBB_LIBRARIES})
4 changes: 2 additions & 2 deletions src/xrCore/xrDebug.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "stdafx.h"
#pragma hdrstop

#include <SDL.h>
#include <SDL_syswm.h>
#include "SDL.h"
#include "SDL_syswm.h"

#include "xrDebug.h"
#include "os_clipboard.h"
Expand Down
4 changes: 2 additions & 2 deletions src/xrEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/OpenAutomate/inc
${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/luabind
/usr/include/SDL2
${SDL_INCLUDE_DIR}
)

list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./tntQAVI.cpp")
Expand All @@ -26,4 +26,4 @@ add_definitions(-DENGINE_BUILD)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})

set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PROJECT_NAME} xrCore luabind xrAPI xrSound xrScriptEngine luajit theora ${OGG_LIBRARIES} xrCDB xrPhysics openal lockfile)
target_link_libraries(${PROJECT_NAME} xrCore luabind xrAPI xrSound xrScriptEngine luajit theora ${OGG_LIBRARIES} xrCDB xrPhysics openal lockfile ${SDL_LIBRARIES})
6 changes: 3 additions & 3 deletions src/xrSound/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/../xrEngine
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/libvorbis/include
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/libogg/include
# ${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/libogg/include
${OGG_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../Externals/openal/include
${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include
)
Expand All @@ -24,5 +25,4 @@ add_definitions(-DXRSOUND_EXPORTS -DdSINGLE -D_SECURE_SCL=0)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})

set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
#target_link_libraries(${PROJECT_NAME} xrCore ${OGG_LIBRARIES} vorbis vorbisfile openal xrAPI xrCDB)
target_link_libraries(${PROJECT_NAME} xrCore xrAPI xrCDB)
target_link_libraries(${PROJECT_NAME} xrCore xrAPI xrCDB ${OGG_LIBRARIES})

0 comments on commit dc31802

Please sign in to comment.