Commit 9cbdd927 authored by 22459's avatar 22459 Committed by Gargaj
Browse files

Add install functionality for 'linux' (#49)

* Add install functionality for 'linux'

* RPATH modification should have also been wrapped in a 'linux' conditional.

* Wrap all the things.

* AND not OR
parent f773ae33
......@@ -27,7 +27,10 @@ option(BONZOMATIC_NDI "Enable NDI?" OFF)
set(BONZOMATIC_WINDOWS_FLAVOR "DX11" CACHE STRING "Windows renderer flavor selected at CMake configure time (DX11, DX9 or GLFW)")
set_property(CACHE BONZOMATIC_WINDOWS_FLAVOR PROPERTY STRINGS DX11 DX9 GLFW)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
if (NOT (UNIX AND (NOT APPLE))) #if not linux
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
endif ()
if (APPLE)
set(CMAKE_FIND_FRAMEWORK LAST)
endif ()
......@@ -436,6 +439,9 @@ set(BZC_PROJECT_LIBS ${BZC_PROJECT_LIBS} ${PLATFORM_LIBS})
# create the executable
link_directories(${BZC_LINK_DIRS})
if (UNIX AND (NOT APPLE))
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
endif ()
add_executable(${BZC_EXE_NAME} ${BZC_PROJECT_SRCS})
if (APPLE AND GLFW_USE_RETINA)
# Add special plist to enable Retina display support
......@@ -473,3 +479,12 @@ if (MSVC)
endif ()
endif ()
## install
if (UNIX AND (NOT APPLE))
if (BONZOMATIC_64BIT)
install(FILES "${CMAKE_SOURCE_DIR}/external/bass/x64/libbass.so" DESTINATION lib)
else ()
install(FILES "${CMAKE_SOURCE_DIR}/external/bass/x86/libbass.so" DESTINATION lib)
endif ()
install(TARGETS ${BZC_EXE_NAME} RUNTIME DESTINATION bin)
endif ()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment