add_definitions(-Dasm=__asm__ -D_INTL_REDIRECT_MACROS)
add_definitions(-DLOCALEDIR=\\"${CMAKE_INSTALL_PREFIX}/locale\\")
-add_definitions(-DDATA_PATH=\\"${CMAKE_INSTALL_PREFIX}/share/vlc\\")
add_definitions(-DPLUGIN_PATH=\\"${CMAKE_INSTALL_PREFIX}/lib/vlc\\")
# vlc
add_library(libvlc SHARED ${SOURCES_libvlc})
install_targets(/lib libvlc)
+set_target_properties(libvlc PROPERTIES OUTPUT_NAME vlc)
+set_target_properties(libvlc PROPERTIES SOVERSION 1)
+set_target_properties(libvlc PROPERTIES VERSION 1.0.0)
+
+target_link_libraries(libvlc ${LIBM})
+target_link_libraries(libvlc ${LIBRT})
+target_link_libraries(libvlc ${LIBICONV})
+target_link_libraries(libvlc ${Dlopen_LIBRARIES})
+
+
# libvlc-control
set( SOURCES_libvlc_control
control/libvlc_internal.h
add_library(libvlc-control SHARED ${SOURCES_libvlc_control})
install_targets(/lib libvlc-control)
+
+set_target_properties(libvlc-control PROPERTIES OUTPUT_NAME vlc-control)
+set_target_properties(libvlc-control PROPERTIES SOVERSION 0)
+set_target_properties(libvlc PROPERTIES VERSION 0.0.0)
+
target_link_libraries(libvlc-control libvlc)
##########################################################
# Libraries
-# iconv
-target_link_libraries(libvlc ${LIBICONV})
-
# Carbon
if(APPLE)
find_library(CARBON_FRAMEWORK Carbon)
add_custom_command(
OUTPUT ${about}
-COMMAND rm -f -- "${about}.tmp"
-COMMAND mkdir -p `dirname ${about}`
-COMMAND mkdir -p -- ../include
+COMMAND rm -f "${about}.tmp"
+COMMAND mkdir -p `dirname ${about}`
COMMAND echo "/* Automatically generated file - DO NOT EDIT */" > "${about}.tmp"
COMMAND echo "static const char psz_license[] =" >> "${about}.tmp"
COMMAND cat ${CMAKE_SOURCE_DIR}/COPYING | sed s/\"/''/g | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }" >> "${about}.tmp"
COMMAND echo ";" >> "${about}.tmp"
COMMAND mv -f -- "${about}.tmp" "${about}"
DEPENDS ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/THANKS ${CMAKE_SOURCE_DIR}/COPYING
-VERBATIM)
+VERBATIM
+)
set(about)
set(LINK_FLAGS "-z defs --as-needed")
endif(NOT APPLE)
-target_link_libraries(libvlc ${LIBRT} ${LIBICONV} ${Dlopen_LIBRARIES})
-target_link_libraries(libvlc ${LIBM})
-
-set_target_properties(libvlc PROPERTIES SOVERSION 1)
-set_target_properties(libvlc libvlc-control PROPERTIES PREFIX "")
set_target_properties(libvlc libvlc-control PROPERTIES LINK_FLAGS "${LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
set_target_properties(libvlc libvlc-control vlc PROPERTIES COMPILE_FLAGS
"-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -I${CMAKE_BINARY_DIR}/src -I${CMAKE_BINARY_DIR}/include" )
+
+##########################################################
+# Tests
+
+add_executable(testapi control/testapi.c)
+add_executable(i18n_atof test/i18n_atof.c)
+add_executable(url test/url.c)
+add_executable(utf8 test/utf8.c)
+
+target_link_libraries(testapi libvlc-control)
+target_link_libraries(i18n_atof libvlc)
+target_link_libraries(url libvlc)
+target_link_libraries(utf8 libvlc)
+
+add_test(testapi ${EXECUTABLE_OUTPUT_PATH}/testapi)
+add_test(i18n_atof ${EXECUTABLE_OUTPUT_PATH}/i18n_atof)
+add_test(url ${EXECUTABLE_OUTPUT_PATH}/url)
+add_test(utf8 ${EXECUTABLE_OUTPUT_PATH}/utf8)