From eaf46aea0972dd31a4afc935d328e3a132dcfba2 Mon Sep 17 00:00:00 2001 From: Darice Date: Tue, 12 Nov 2024 14:40:32 -0700 Subject: [PATCH] updates for sdktool and test --- CMakeLists.txt | 2 ++ sdktool/CMakeLists.txt | 8 ++++++-- test/CMakeLists.txt | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33bec5f8b..9bb973902 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,8 @@ function(set_default_compile_options target) set(MAIN_CFLAGS "") endif() set(MAIN_CFLAGS "${MAIN_CFLAGS} -D__64BIT__") + set_property(TARGET ${target} PROPERTY CXX_STANDARD 17) + set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED ON) if(MSVC) set(MAIN_CFLAGS "${MAIN_CFLAGS} /bigobj /MP") set(MAIN_CFLAGS "${MAIN_CFLAGS} /D__WINDOWS__ /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS /DLPWINAPP") diff --git a/sdktool/CMakeLists.txt b/sdktool/CMakeLists.txt index 77553fb9d..306349f0d 100644 --- a/sdktool/CMakeLists.txt +++ b/sdktool/CMakeLists.txt @@ -112,11 +112,15 @@ endif() target_link_libraries(SDKtool ${wxWidgets_LIBRARIES}) if (UNIX AND NOT APPLE) - target_link_libraries(SDKtool -ldl -lfontconfig) + target_link_libraries(SDKtool ${CMAKE_DL_LIBS} -lfontconfig) endif() if (UNIX) - target_link_libraries(SDKtool -lm -lcurl) + find_library(MATH_LIBRARY m) + if(MATH_LIBRARY) + target_link_libraries(SDKtool ${MATH_LIBRARY}) + endif() + target_link_libraries(SDKtool -lcurl) elseif (MSVC) find_library( CURL_LIB NAMES libcurl.lib diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index eb8d4cd5b..c194c4038 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -90,7 +90,8 @@ endif() target_link_libraries(Test ssc splinter) if (UNIX) - target_link_libraries(Test -ldl -lpthread) + find_package(Threads REQUIRED) + target_link_libraries(Test Threads::Threads ${CMAKE_DL_LIBS}) endif()