Added install targets
This commit is contained in:
parent
dffc0f9539
commit
3ecd4dc1aa
1 changed files with 12 additions and 0 deletions
|
@ -8,12 +8,14 @@ endif(COMMAND cmake_policy)
|
||||||
macro(makeAnalyser analyserName format)
|
macro(makeAnalyser analyserName format)
|
||||||
add_executable( MistAnalyser${analyserName} src/analysers/${format}_analyser.cpp )
|
add_executable( MistAnalyser${analyserName} src/analysers/${format}_analyser.cpp )
|
||||||
target_link_libraries( MistAnalyser${analyserName} mist )
|
target_link_libraries( MistAnalyser${analyserName} mist )
|
||||||
|
install( TARGETS MistAnalyser${analyserName} DESTINATION bin)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(makeInput inputName format)
|
macro(makeInput inputName format)
|
||||||
add_executable( MistIn${inputName} src/input/mist_in.cpp src/input/input.cpp src/input/input_${format}.cpp src/io.cpp)
|
add_executable( MistIn${inputName} src/input/mist_in.cpp src/input/input.cpp src/input/input_${format}.cpp src/io.cpp)
|
||||||
set_target_properties( MistIn${inputName} PROPERTIES COMPILE_DEFINITIONS INPUTTYPE=\"input_${format}.h\")
|
set_target_properties( MistIn${inputName} PROPERTIES COMPILE_DEFINITIONS INPUTTYPE=\"input_${format}.h\")
|
||||||
target_link_libraries( MistIn${inputName} mist )
|
target_link_libraries( MistIn${inputName} mist )
|
||||||
|
install( TARGETS MistIn${inputName} DESTINATION bin)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(makeOutput outputName format)
|
macro(makeOutput outputName format)
|
||||||
|
@ -31,6 +33,7 @@ macro(makeOutput outputName format)
|
||||||
add_executable( MistOut${outputName} src/output/mist_out.cpp src/output/output.cpp ${httpOutput} ${tsOutput} src/output/output_${format}.cpp src/io.cpp)
|
add_executable( MistOut${outputName} src/output/mist_out.cpp src/output/output.cpp ${httpOutput} ${tsOutput} src/output/output_${format}.cpp src/io.cpp)
|
||||||
set_target_properties( MistOut${outputName} PROPERTIES COMPILE_DEFINITIONS "OUTPUTTYPE=\"output_${format}.h\";TS_BASECLASS=${tsBaseClass}")
|
set_target_properties( MistOut${outputName} PROPERTIES COMPILE_DEFINITIONS "OUTPUTTYPE=\"output_${format}.h\";TS_BASECLASS=${tsBaseClass}")
|
||||||
target_link_libraries( MistOut${outputName} mist )
|
target_link_libraries( MistOut${outputName} mist )
|
||||||
|
install( TARGETS MistOut${outputName} DESTINATION bin)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
SET(SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
SET(SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||||
|
@ -50,6 +53,10 @@ else()
|
||||||
SET(CLOSURE cat)
|
SET(CLOSURE cat)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT CMAKE_INSTALL_PREFIX)
|
||||||
|
set (CMAKE_INSTALL_PREFIX /usr)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (RELEASE)
|
if (RELEASE)
|
||||||
set (RELEASE_RAW ${RELEASE})
|
set (RELEASE_RAW ${RELEASE})
|
||||||
else()
|
else()
|
||||||
|
@ -165,6 +172,8 @@ ${SOURCE_DIR}/lib/json.cpp
|
||||||
)
|
)
|
||||||
add_library ( mist ${libHeaders} ${libSources} )
|
add_library ( mist ${libHeaders} ${libSources} )
|
||||||
target_link_libraries( mist -lpthread -lrt)
|
target_link_libraries( mist -lpthread -lrt)
|
||||||
|
install( FILES ${libHeaders} DESTINATION include/mist )
|
||||||
|
install( TARGETS mist DESTINATION lib )
|
||||||
|
|
||||||
add_custom_command(TARGET mist
|
add_custom_command(TARGET mist
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
|
@ -181,6 +190,7 @@ makeAnalyser(MP4 mp4)
|
||||||
makeAnalyser(OGG ogg)
|
makeAnalyser(OGG ogg)
|
||||||
add_executable( MistInfo src/analysers/info.cpp )
|
add_executable( MistInfo src/analysers/info.cpp )
|
||||||
target_link_libraries( MistInfo mist )
|
target_link_libraries( MistInfo mist )
|
||||||
|
install( TARGETS MistInfo DESTINATION bin)
|
||||||
|
|
||||||
makeInput(DTSC dtsc)
|
makeInput(DTSC dtsc)
|
||||||
makeInput(MP3 mp3)
|
makeInput(MP3 mp3)
|
||||||
|
@ -234,6 +244,7 @@ add_executable( MistOutHTTP src/output/mist_out.cpp src/output/output.cpp src/ou
|
||||||
set_target_properties( MistOutHTTP PROPERTIES COMPILE_DEFINITIONS "OUTPUTTYPE=\"output_http_internal.h\"")
|
set_target_properties( MistOutHTTP PROPERTIES COMPILE_DEFINITIONS "OUTPUTTYPE=\"output_http_internal.h\"")
|
||||||
add_dependencies(MistOutHTTP embedcode)
|
add_dependencies(MistOutHTTP embedcode)
|
||||||
target_link_libraries( MistOutHTTP mist )
|
target_link_libraries( MistOutHTTP mist )
|
||||||
|
install( TARGETS MistOutHTTP DESTINATION bin)
|
||||||
|
|
||||||
set(controllerHeaders
|
set(controllerHeaders
|
||||||
${SOURCE_DIR}/src/controller/controller_api.h
|
${SOURCE_DIR}/src/controller/controller_api.h
|
||||||
|
@ -257,6 +268,7 @@ add_executable( MistController ${controllerHeaders} ${controllerSources} )
|
||||||
set_target_properties( MistController PROPERTIES COMPILE_DEFINITIONS RELEASE=${RELEASE})
|
set_target_properties( MistController PROPERTIES COMPILE_DEFINITIONS RELEASE=${RELEASE})
|
||||||
target_link_libraries( MistController mist )
|
target_link_libraries( MistController mist )
|
||||||
add_dependencies(MistController localSettingsPage)
|
add_dependencies(MistController localSettingsPage)
|
||||||
|
install( TARGETS MistController DESTINATION bin)
|
||||||
|
|
||||||
#make clean stuff
|
#make clean stuff
|
||||||
add_custom_target(clean-all
|
add_custom_target(clean-all
|
||||||
|
|
Loading…
Add table
Reference in a new issue