mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Merge branch 'latomic' of https://github.com/janisozaur/lgogdownloader
This commit is contained in:
commit
fe494e8e74
@ -139,6 +139,19 @@ target_link_libraries(${PROJECT_NAME}
|
|||||||
PRIVATE ${ZLIB_LIBRARIES}
|
PRIVATE ${ZLIB_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Check if libatomic is needed in order to use std::atomic, and add
|
||||||
|
# it to the list of JavaScriptCore libraries.
|
||||||
|
file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
|
||||||
|
"#include <atomic>\n"
|
||||||
|
"int main() { std::atomic<int64_t> i(0); i++; return 0; }\n")
|
||||||
|
try_compile(ATOMIC_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomic.cpp)
|
||||||
|
if (NOT ATOMIC_BUILD_SUCCEEDED)
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PRIVATE -latomic
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
|
||||||
|
|
||||||
if(LINK_LIBCRYPTO EQUAL 1)
|
if(LINK_LIBCRYPTO EQUAL 1)
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE ${Libcrypto_LIBRARIES}
|
PRIVATE ${Libcrypto_LIBRARIES}
|
||||||
|
Loading…
Reference in New Issue
Block a user