]> git.sesse.net Git - vlc/blobdiff - extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt
cmake: Add VERBATIM back. Apparently this could be a cmake issue. Need to investigate.
[vlc] / extras / buildsystem / cmake / CMakeLists / src_CMakeLists.txt
index 5a335717cdb2ff6e01938e5aee5694ba6d07b9cd..fdd4434ebe40cb00090c4c677f48babe0fc47e74 100644 (file)
@@ -2,7 +2,6 @@ include_directories( . )
 
 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
@@ -135,6 +134,16 @@ endif(SYS_DARWIN)
 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
@@ -165,14 +174,16 @@ set( SOURCES_libvlc_control
 
 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)
@@ -218,9 +229,8 @@ set(about "${CMAKE_BINARY_DIR}/include/vlc_about.h")
 
 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"
@@ -233,7 +243,8 @@ COMMAND grep N: ${CMAKE_SOURCE_DIR}/AUTHORS | cut -d "\ " -f 2- | sed "s/\"/''/g
 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)
 
 
@@ -245,11 +256,24 @@ if(NOT APPLE)
    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)