From dfddf5294677407c3a01b3a13c8348f02fe993ee Mon Sep 17 00:00:00 2001 From: Gabriele Contini <gcontini@users.noreply.github.com> Date: ćšć, 19 9æ 2019 20:20:18 +0800 Subject: [PATCH] Feature/mingw cross compile (#51) --- test/library/CMakeLists.txt | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/library/CMakeLists.txt b/test/library/CMakeLists.txt index 314aa6f..49edff0 100644 --- a/test/library/CMakeLists.txt +++ b/test/library/CMakeLists.txt @@ -2,17 +2,19 @@ license_reader_test LicenseReader_test.cpp ) -#add_dependencies( license_reader_test boost_filesystem ) target_link_libraries( license_reader_test - license++_static + licensepp_static ${Boost_LIBRARIES} ) -#SET_TARGET_PROPERTIES(license_reader_test PROPERTIES LINK_SEARCH_START_STATIC ON) -#SET_TARGET_PROPERTIES(license_reader_test PROPERTIES LINK_SEARCH_END_STATIC OFF) -ADD_TEST(NAME license_reader_test COMMAND license_reader_test) +IF( ( CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") AND CMAKE_CROSSCOMPILING) +#binfmt_misc doesn't work in my system :( + ADD_TEST(NAME license_reader_test COMMAND wine ${CMAKE_CURRENT_BINARY_DIR}/license_reader_test) +ELSE() + ADD_TEST(NAME license_reader_test COMMAND license_reader_test) +ENDIF() IF(WIN32) #test windows @@ -27,9 +29,6 @@ os ${Boost_LIBRARIES} ) - - #add_dependencies( os_linux_test ) - #SET_TARGET_PROPERTIES(os_linux_test PROPERTIES LINK_SEARCH_START_STATIC ON) + ADD_TEST(NAME os_linux_test COMMAND os_linux_test) - ENDIF(WIN32) -- Gitblit v1.9.1