mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Yet another attempt to fix Windows compile:
when building vcmi_lib statically (or linking against static vcmi_lib) do not place dllexport/dllimport tags
This commit is contained in:
		
							
								
								
									
										5
									
								
								Global.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Global.h
									
									
									
									
									
								
							| @@ -217,7 +217,10 @@ typedef boost::lock_guard<boost::recursive_mutex> TLockGuardRec; | ||||
| /* ---------------------------------------------------------------------------- */ | ||||
| // Import + Export macro declarations | ||||
| #ifdef VCMI_WINDOWS | ||||
| #  ifdef __GNUC__ | ||||
| #ifdef VCMI_DLL_STATIC | ||||
| #    define DLL_IMPORT | ||||
| #    define DLL_EXPORT | ||||
| #elif defined(__GNUC__) | ||||
| #    define DLL_IMPORT __attribute__((dllimport)) | ||||
| #    define DLL_EXPORT __attribute__((dllexport)) | ||||
| #  else | ||||
|   | ||||
| @@ -1,2 +1,3 @@ | ||||
| add_main_lib(vcmi_lib_server STATIC) | ||||
| target_compile_definitions(vcmi_lib_server PUBLIC VCMI_LIB_NAMESPACE=LIB_SERVER) | ||||
| target_compile_definitions(vcmi_lib_server PUBLIC VCMI_DLL_STATIC=1) | ||||
|   | ||||
| @@ -24,6 +24,7 @@ endif() | ||||
|  | ||||
| if(ENABLE_SINGLE_APP_BUILD) | ||||
| 	add_library(vcmiserver STATIC ${server_SRCS} ${server_HEADERS}) | ||||
| 	target_compile_definitions(vcmiserver PUBLIC VCMI_DLL_STATIC=1) | ||||
| 	set(server_LIBS vcmi_lib_server) | ||||
| else() | ||||
| 	add_executable(vcmiserver ${server_SRCS} ${server_HEADERS}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user