mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-26 09:11:35 +01:00
Add STORMLIB_NO_AUTO_LINK define to disable linking with pragma
This commit is contained in:
@@ -308,7 +308,7 @@ endif()
|
||||
add_library(${LIBRARY_NAME} ${LIB_TYPE} ${SRC_FILES} ${SRC_ADDITIONAL_FILES})
|
||||
|
||||
target_link_libraries(${LIBRARY_NAME} ${LINK_LIBS})
|
||||
target_compile_definitions(${LIBRARY_NAME} PUBLIC) #CMake should take care of the linking
|
||||
target_compile_definitions(${LIBRARY_NAME} INTERFACE STORMLIB_NO_AUTO_LINK) #CMake will take care of the linking
|
||||
target_include_directories(${LIBRARY_NAME} PUBLIC src/)
|
||||
set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "src/StormLib.h;src/StormPort.h")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
|
||||
@@ -99,8 +99,11 @@ extern "C" {
|
||||
// Z - S for static-linked CRT library, D for multithreaded DLL CRT library
|
||||
//
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__STORMLIB_SELF__)
|
||||
|
||||
#if defined(__STORMLIB_SELF__) && !defined(STORMLIB_NO_AUTO_LINK)
|
||||
#define STORMLIB_NO_AUTO_LINK // Define this if you don't want to link using pragmas when using msvc
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(STORMLIB_NO_AUTO_LINK)
|
||||
#ifdef _DEBUG // DEBUG VERSIONS
|
||||
#ifndef _UNICODE
|
||||
#ifdef _DLL
|
||||
|
||||
Reference in New Issue
Block a user