]> git.sesse.net Git - casparcg/blobdiff - common/CMakeLists.txt
Add options for following modules:
[casparcg] / common / CMakeLists.txt
index 77437dc05673a7c0466eb8e3b46265924038e887..ae144c7026d6acc8bac975706a4cd7cf1dcd9956 100644 (file)
@@ -95,10 +95,10 @@ add_library(common ${SOURCES} ${HEADERS} ${OS_SPECIFIC_SOURCES})
 add_precompiled_header(common stdafx.h FORCEINCLUDE)
 
 include_directories(..)
-include_directories(${BOOST_INCLUDE_PATH})
-include_directories(${RXCPP_INCLUDE_PATH})
-include_directories(${TBB_INCLUDE_PATH})
-include_directories(${GLEW_INCLUDE_PATH})
+include_directories(${Boost_INCLUDE_DIRS})
+include_directories(${RXCPP_INCLUDE_DIRS})
+include_directories(${TBB_INCLUDE_DIRS})
+include_directories(${GLEW_INCLUDE_DIRS})
 
 source_group(sources ./*)
 source_group(sources\\gl gl/*)
@@ -107,66 +107,51 @@ source_group(sources\\compiler\\vs compiler/vs/*)
 source_group(sources\\os\\windows os/windows/*)
 source_group(sources\\os os/*)
 
+target_link_libraries(common
+       "${ASMLIB_LIBRARIES}"
+       "${TBB_LIBRARIES}"
+       "${GLEW_LIBRARIES}"
+       "${OPENGL_gl_LIBRARY}"
+       "${FREETYPE_LIBRARIES}"
+       "${OPENAL_LIBRARY}"
+       "${SFML_LIBRARIES}"
+)
+
 if (MSVC)
        target_link_libraries(common
                jpeg.lib
                sndfile.lib
-               optimized sfml-system-2.lib
-               optimized sfml-window-2.lib
-               optimized sfml-graphics-2.lib
-               debug sfml-system-d-2.lib
-               debug sfml-window-d-2.lib
-               debug sfml-graphics-d-2.lib
                Winmm.lib
                Ws2_32.lib
-               optimized tbb.lib
-               debug tbb_debug.lib
-               OpenGL32.lib
-               glew32.lib
-               openal32.lib
                zlibstat.lib
        )
 else ()
        target_link_libraries(common
-               boost_system
-               boost_thread
-               boost_chrono
-               boost_filesystem
-               boost_log
-               boost_locale
-               boost_regex
-               boost_date_time
-               tbb
-               tbbmalloc
-               tbbmalloc_proxy
-               sfml-graphics-s
-               sfml-window-s
-               sfml-system-s
-               GLEW
-               GL
+               "${Boost_LIBRARIES}"
                X11
                jpeg
                sndfile
-               freetype
                udev
                Xrandr
                pthread
        )
 endif ()
 
-if(MSVC)
-       casparcg_add_runtime_dependency("${GLEW_BIN_PATH}/glew32.dll")
-       casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbb.dll")
-       casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbb_debug.dll")
+if(NOT USE_SYSTEM_TBB)
+       if(MSVC)
+               casparcg_add_runtime_dependency("${GLEW_BIN_DIR}/glew32.dll")
+               casparcg_add_runtime_dependency("${TBB_BIN_DIR}/tbb.dll")
+               casparcg_add_runtime_dependency("${TBB_BIN_DIR}/tbb_debug.dll")
 
-       # Reenable when tbb gets official support for vc14
-       # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc.dll")
-       # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_debug.dll")
-       # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_proxy.dll")
-       # casparcg_add_runtime_dependency("${TBB_BIN_PATH}/tbbmalloc_proxy_debug.dll")
-else()
-       casparcg_add_runtime_dependency("${GLEW_BIN_PATH}/libGLEW.so.1.12")
-       casparcg_add_runtime_dependency("${TBB_BIN_PATH}/libtbb.so.2")
-       casparcg_add_runtime_dependency("${TBB_BIN_PATH}/libtbbmalloc_proxy.so.2")
-       casparcg_add_runtime_dependency("${TBB_BIN_PATH}/libtbbmalloc.so.2")
+               # Reenable when tbb gets official support for vc14
+               # casparcg_add_runtime_dependency("${TBB_BIN_DIR}/tbbmalloc.dll")
+               # casparcg_add_runtime_dependency("${TBB_BIN_DIR}/tbbmalloc_debug.dll")
+               # casparcg_add_runtime_dependency("${TBB_BIN_DIR}/tbbmalloc_proxy.dll")
+               # casparcg_add_runtime_dependency("${TBB_BIN_DIR}/tbbmalloc_proxy_debug.dll")
+       else()
+               casparcg_add_runtime_dependency("${GLEW_BIN_DIR}/libGLEW.so.1.12")
+               casparcg_add_runtime_dependency("${TBB_BIN_DIR}/libtbb.so.2")
+               casparcg_add_runtime_dependency("${TBB_BIN_DIR}/libtbbmalloc_proxy.so.2")
+               casparcg_add_runtime_dependency("${TBB_BIN_DIR}/libtbbmalloc.so.2")
+       endif()
 endif()