From f6437cfaed1dd0acd1ec63e1c282d0e7edfa4522 Mon Sep 17 00:00:00 2001
From: davidwed <davidwe@posteo.de>
Date: 周六, 07 9月 2019 21:54:13 +0800
Subject: [PATCH] Fix a compilier error with msys2-mingw64 ( ld.exe: cannot find -ldl ) (#35)

---
 test/library/CMakeLists.txt |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/test/library/CMakeLists.txt b/test/library/CMakeLists.txt
index a88aae1..314aa6f 100644
--- a/test/library/CMakeLists.txt
+++ b/test/library/CMakeLists.txt
@@ -7,13 +7,12 @@
 target_link_libraries(
  license_reader_test
  license++_static
- boost_filesystem
- boost_test
+ ${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(license_reader_test ${EXECUTABLE_OUTPUT_PATH}/license_reader_test)
+ADD_TEST(NAME license_reader_test COMMAND license_reader_test)
 
 IF(WIN32)
 #test windows
@@ -26,11 +25,11 @@
 	target_link_libraries(
  		os_linux_test
  		os
- 		${Boost_test_LIBRARY}
+ 		${Boost_LIBRARIES}
 	)
 	
 	#add_dependencies( os_linux_test )
 	#SET_TARGET_PROPERTIES(os_linux_test PROPERTIES LINK_SEARCH_START_STATIC ON)
-	ADD_TEST(os_linux_test ${EXECUTABLE_OUTPUT_PATH}/os_linux_test)   
+	ADD_TEST(NAME os_linux_test COMMAND os_linux_test)
 	
-ENDIF(WIN32)
\ No newline at end of file
+ENDIF(WIN32)

--
Gitblit v1.9.1