]> git.lyx.org Git - features.git/commitdiff
Cmake build:
authorKornel Benko <kornel@lyx.org>
Sun, 21 Oct 2012 14:58:45 +0000 (16:58 +0200)
committerKornel Benko <kornel@lyx.org>
Sun, 21 Oct 2012 14:58:45 +0000 (16:58 +0200)
Added dependencies to target `test'. Now all the needed executables
are recreated prior to running tests if not already existant.

CMakeLists.txt
src/CMakeLists.txt
src/client/CMakeLists.txt
src/support/tests/CMakeLists.txt
src/tex2lyx/CMakeLists.txt
src/tex2lyx/test/CMakeLists.txt

index b5bb34667a60e8d95ee7bc80415cade230e89013..1e0b9c3ef2d3a8ed7ee15fd79baec545e5cf1042 100644 (file)
@@ -492,6 +492,12 @@ if(LYX_NLS)
        endif()
 endif()
 
+if(LYX_EXTERNAL_LIBINTL)
+       set(intl_link ${LIBINTL_LIBRARIES})
+else()
+       set(intl_link intl)
+endif()
+
 find_package(ICONV REQUIRED)
 find_package(ZLIB REQUIRED)
 
index 5862136f017521e36c8bd68b13f6eab9e7a13300..b5a9a29fa675c3e7e025d40ebb33f293b2743606 100644 (file)
@@ -126,12 +126,11 @@ target_link_libraries(${_lyx}
        frontend_qt4
        graphics
        support
-       ${LIBINTL_LIBRARIES}
+       ${intl_link}
        ${ICONV_LIBRARY}
        ${QT_QTMAIN_LIBRARY}
        ${vld_dll})
 
-
 if(HUNSPELL_FOUND)
        target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
 endif()
index 6fe918ce1ecdc57d3665f5d4f3f88eb3a13fcf8e..33024378093cfd8f85d283bd1c5767a2b29cadd0 100644 (file)
@@ -29,7 +29,7 @@ add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
 target_link_libraries(${_lyxclient}
        support
        ${Lyx_Boost_Libraries}
-       ${LIBINTL_LIBRARIES}
+       ${intl_link}
        ${ICONV_LIBRARY}
        ${QT_QTCORE_LIBRARY}
        ${QT_QTGUI_LIBRARY})
index 7a25e2ad45e29d1dfad02ab2be54956bc453439f..d464c2a63ea2d865615d7bd3eaa443c98e6a4ec1 100644 (file)
@@ -13,9 +13,9 @@ macro(sources _program)
        endforeach()
        set(${_program}_SOURCES ${_tmplist})
        add_executable(${_program} ${_tmplist})
-       target_link_libraries(${_program} support
+       target_link_libraries(${_program} support ${intl_link}
                ${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
-               ${ZLIB_LIBRARY} ${LIBINTL_LIBRARIES} ${ICONV_LIBRARY})
+               ${ZLIB_LIBRARY} ${ICONV_LIBRARY})
 endmacro()
 
 file(GLOB test_sources ${TOP_SRC_DIR}/src/support/tests/${LYX_CPP_FILES})
index 1952a81251ba7410e78e63759d652e844149ed99..496cbdd0537b56916fc72a03b6685d1f182afedd 100644 (file)
@@ -50,7 +50,7 @@ target_link_libraries(${_tex2lyx}
        ${Lyx_Boost_Libraries}
        ${QT_QTCORE_LIBRARY}
        ${QT_QTGUI_LIBRARY}
-       ${LIBINTL_LIBRARIES}
+       ${intl_link}
        ${ICONV_LIBRARY})
 
 if(WIN32)
index e85222f070cde92b7082dc720a9a78be06dbe2b3..365d953f69bacb3e7c2ab1a74ebae8385b77d6ed 100644 (file)
@@ -34,6 +34,8 @@ ADD_CUSTOM_COMMAND(
 
 add_test(NAME build_tex2lyx
   COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_tex2lyx})
+add_test(NAME build_lyx
+  COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_lyx})
 add_test(NAME roundtrip_tex2lyx
   WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
   COMMAND ${LYX_PYTHON_EXECUTABLE} "${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py"
@@ -41,5 +43,6 @@ add_test(NAME roundtrip_tex2lyx
   "${TOP_SRC_DIR}/lib/scripts"
   "${CMAKE_CURRENT_BINARY_DIR}")
 
+set_tests_properties(build_tex2lyx PROPERTIES DEPENDS build_lyx)
 set_tests_properties(roundtrip_tex2lyx PROPERTIES DEPENDS build_tex2lyx)