From 0ec4d68600b83d41d2e48ad35d18e2a00f234619 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 21 9月 2019 01:34:22 +0800
Subject: [PATCH] Merge branch 'develop' of https://github.com/open-license-manager/open-license-manager into develop

---
 test/library/CMakeLists.txt |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/test/library/CMakeLists.txt b/test/library/CMakeLists.txt
index d4067c2..49edff0 100644
--- a/test/library/CMakeLists.txt
+++ b/test/library/CMakeLists.txt
@@ -1,5 +1,3 @@
-link_directories ( ${Boost_LIBRARY_DIRS} )
-
 add_executable(
  license_reader_test
  LicenseReader_test.cpp
@@ -7,12 +5,16 @@
 
 target_link_libraries(
  license_reader_test
- license++_static
+ licensepp_static
  ${Boost_LIBRARIES}
 )
 
-SET_TARGET_PROPERTIES(license_reader_test PROPERTIES LINK_SEARCH_START_STATIC ON)
-ADD_TEST(license_reader_test ${EXECUTABLE_OUTPUT_PATH}/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
@@ -28,6 +30,5 @@
  		${Boost_LIBRARIES}
 	)
 
-	SET_TARGET_PROPERTIES(os_linux_test PROPERTIES LINK_SEARCH_START_STATIC ON)
-	ADD_TEST(os_linux_test ${EXECUTABLE_OUTPUT_PATH}/os_linux_test)   
-ENDIF(WIN32)
\ No newline at end of file
+	ADD_TEST(NAME os_linux_test COMMAND os_linux_test)
+ENDIF(WIN32)

--
Gitblit v1.9.1