diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | utils/adlmidi-2/CMakeLists.txt | 6 | ||||
-rw-r--r-- | utils/gen_adldata/CMakeLists.txt | 6 | ||||
-rw-r--r-- | utils/vlc_codec/CMakeLists.txt | 2 |
4 files changed, 4 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c5a5f17..77454ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ endfunction() function(set_visibility_hidden destTarget) if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang)$" AND NOT DJGPP) - if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.2) + if(CMAKE_VERSION VERSION_GREATER 3.2) target_compile_options(${destTarget} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-fvisibility-inlines-hidden> -fvisibility=hidden) else() diff --git a/utils/adlmidi-2/CMakeLists.txt b/utils/adlmidi-2/CMakeLists.txt index 087c06a..e9c1f7d 100644 --- a/utils/adlmidi-2/CMakeLists.txt +++ b/utils/adlmidi-2/CMakeLists.txt @@ -59,11 +59,7 @@ if(NOT WITH_CPP_EXTRAS) message(FATAL_ERROR "ADLMIDI2 Requires C++ Extras. Please enable WITH_CPP_EXTRAS option!") endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MinGW" OR - CMAKE_COMPILER_IS_MINGW) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Intel|MinGW" OR MINGW) if(OPENMP_FOUND) target_compile_options(adlmidi2 PUBLIC "-fopenmp") target_link_libraries(adlmidi2 PRIVATE "-fopenmp") diff --git a/utils/gen_adldata/CMakeLists.txt b/utils/gen_adldata/CMakeLists.txt index a361501..ef1339b 100644 --- a/utils/gen_adldata/CMakeLists.txt +++ b/utils/gen_adldata/CMakeLists.txt @@ -43,11 +43,7 @@ add_executable(gen_adldata if(NOT MSVC) target_link_libraries(gen_adldata PRIVATE pthread m stdc++) endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MinGW" OR - CMAKE_COMPILER_IS_MINGW) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Intel|MinGW" OR MINGW) if(OPENMP_FOUND) target_compile_options(gen_adldata PUBLIC "-fopenmp") target_link_libraries(gen_adldata PRIVATE "-fopenmp") diff --git a/utils/vlc_codec/CMakeLists.txt b/utils/vlc_codec/CMakeLists.txt index 00fdcae..aecf582 100644 --- a/utils/vlc_codec/CMakeLists.txt +++ b/utils/vlc_codec/CMakeLists.txt @@ -24,7 +24,7 @@ target_include_directories(adlmidi_vlc_plugin PRIVATE target_link_libraries(adlmidi_vlc_plugin PRIVATE ADLMIDI_static ${LIBVLCCORE_LIBRARY} m) -if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_COMPILER_IS_GNUCXX) +if(WIN32 AND CMAKE_COMPILER_IS_GNUCXX) set_property(TARGET adlmidi_vlc_plugin APPEND_STRING PROPERTY LINK_FLAGS " -static-libgcc -static-libstdc++") set_property(TARGET adlmidi_vlc_plugin APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-Bstatic,--whole-archive -lpthread -Wl,-Bdynamic,--no-whole-archive") elseif(NOT WIN32) |