mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Improve CMake system and compiler checks
This commit is contained in:
+3
-3
@@ -177,7 +177,7 @@ set_target_properties(loot PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if(WIN32)
|
||||
target_compile_definitions(loot PRIVATE UNICODE _UNICODE LOOT_EXPORT)
|
||||
|
||||
set(LOOT_LIBS ntdll ws2_32 bcrypt)
|
||||
@@ -185,7 +185,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_link_libraries(loot PRIVATE ${LOOT_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(loot PRIVATE
|
||||
"-Wall"
|
||||
"-Wextra"
|
||||
@@ -367,7 +367,7 @@ if(NOT DEFINED CPACK_PACKAGE_VERSION)
|
||||
set(CPACK_PACKAGE_VERSION ${GIT_DESCRIBE_STRING})
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if(WIN32)
|
||||
set(CPACK_GENERATOR "7Z")
|
||||
else()
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
|
||||
@@ -93,7 +93,7 @@ set_target_properties(libloot_tests PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if(WIN32)
|
||||
target_compile_definitions(libloot_tests PRIVATE UNICODE _UNICODE)
|
||||
|
||||
if((NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") OR NOT LIBLOOT_BUILD_SHARED)
|
||||
@@ -103,7 +103,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_link_libraries(libloot_tests PRIVATE ${LOOT_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(libloot_tests PRIVATE "-Wall" "-Wextra")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user