Ver Fonte

Updated build options for debug/release libraries linkage

Ivan Arkhipov há 5 anos atrás
pai
commit
e2a3f48343
1 ficheiros alterados com 6 adições e 8 exclusões
  1. 6 8
      CMakeLists.txt

+ 6 - 8
CMakeLists.txt

@@ -104,13 +104,11 @@ add_executable(LotRO_dat_patcher ${CMAKE_SOURCE_DIR}/src/Examples/patcher_exampl
 add_executable(LotRO_dat_info_gatherer ${SOURCE_FILES} ${HEADER_FILES} ${CMAKE_SOURCE_DIR}/src/Examples/info_gatherer.cpp)
 
 foreach (TARGET LotroDat_static LotroDat LotRO_dat_extractor LotRO_dat_patcher LotRO_dat_info_gatherer)
-    #if(MSVC)
-    #    target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third_Party/Zlib/zlibstatic.lib)
-    #    target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third_Party/Yaml-cpp/libyaml-cppmt.lib)
-    #    target_link_libraries(${TARGET} vcruntime.lib MSVCRT.lib)
-    #else(MSVC)
-    target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third_Party/lib/libzlibstatic.a)
-    target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third_Party/lib/libyaml-cpp.a)
+    target_link_libraries(${TARGET} optimized ${CMAKE_SOURCE_DIR}/Third_Party/lib/libzlibstatic.a
+                                    debug ${CMAKE_SOURCE_DIR}/Third_Party/lib/libzlibstaticd.a
+            )
+    target_link_libraries(${TARGET} optimized ${CMAKE_SOURCE_DIR}/Third_Party/lib/libyaml-cpp.a
+                                    debug ${CMAKE_SOURCE_DIR}/Third_Party/lib/libyaml-cppd.a)
+
     target_link_libraries(${TARGET} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic)
-    #endif(MSVC)
 endforeach (TARGET LotroDat_static LotroDat LotRO_dat_extractor LotRO_dat_patcher)