diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-15 17:42:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-15 17:42:02 +0400 |
commit | bb6e0834e0f55070e4406ca4d385c9e6dc246655 (patch) | |
tree | 682d1c4255f22c1f4b42c8a53a3836a3b7a19ad4 | |
parent | 4f3936083a67cd106124dd0392c5ef4a4dcdad7b (diff) |
cmake: combine debug/optimized into one target_link_libraries() call.
-rw-r--r-- | build_files/cmake/macros.cmake | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index a862034c002..10d6f712da1 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -150,15 +150,22 @@ macro(setup_liblinks target) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ") - target_link_libraries(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS}) + target_link_libraries(${target} + ${OPENGL_gl_LIBRARY} + ${OPENGL_glu_LIBRARY} + ${JPEG_LIBRARIES} + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${LLIBS}) # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs target_link_libraries(${target} ${PYTHON_LINKFLAGS}) if(WIN32 AND NOT UNIX) - target_link_libraries(${target} debug ${PYTHON_LIBRARY}_d) - target_link_libraries(${target} optimized ${PYTHON_LIBRARY}) + target_link_libraries(${target} + debug ${PYTHON_LIBRARY}_d + optimized ${PYTHON_LIBRARY}) else() target_link_libraries(${target} ${PYTHON_LIBRARY}) endif() @@ -168,8 +175,12 @@ macro(setup_liblinks target_link_libraries(${target} ${GLEW_LIBRARY}) endif() - target_link_libraries(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) - target_link_libraries(${target} ${FREETYPE_LIBRARY}) + target_link_libraries(${target} + ${OPENGL_glu_LIBRARY} + ${JPEG_LIBRARIES} + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${FREETYPE_LIBRARY}) if(WITH_INTERNATIONAL) target_link_libraries(${target} ${GETTEXT_LIB}) @@ -206,8 +217,9 @@ macro(setup_liblinks if(WITH_IMAGE_OPENEXR) if(WIN32 AND NOT UNIX) foreach(_LOOP_VAR ${OPENEXR_LIBRARIES}) - target_link_libraries(${target} debug ${_LOOP_VAR}_d) - target_link_libraries(${target} optimized ${_LOOP_VAR}) + target_link_libraries(${target} + debug ${_LOOP_VAR}_d + optimized ${_LOOP_VAR}) endforeach() unset(_LOOP_VAR) else() @@ -223,20 +235,24 @@ macro(setup_liblinks if(WITH_OPENCOLLADA) if(WIN32 AND NOT UNIX) foreach(_LOOP_VAR ${OPENCOLLADA_LIB}) - target_link_libraries(${target} debug ${_LOOP_VAR}_d) - target_link_libraries(${target} optimized ${_LOOP_VAR}) + target_link_libraries(${target} + debug ${_LOOP_VAR}_d + optimized ${_LOOP_VAR}) endforeach() unset(_LOOP_VAR) - target_link_libraries(${target} debug ${PCRE_LIB}_d) - target_link_libraries(${target} optimized ${PCRE_LIB}) + target_link_libraries(${target} + debug ${PCRE_LIB}_d + optimized ${PCRE_LIB}) if(EXPAT_LIB) - target_link_libraries(${target} debug ${EXPAT_LIB}_d) - target_link_libraries(${target} optimized ${EXPAT_LIB}) + target_link_libraries(${target} + debug ${EXPAT_LIB}_d + optimized ${EXPAT_LIB}) endif() else() - target_link_libraries(${target} ${OPENCOLLADA_LIB}) - target_link_libraries(${target} ${PCRE_LIB}) - target_link_libraries(${target} ${EXPAT_LIB}) + target_link_libraries(${target} + ${OPENCOLLADA_LIB} + ${PCRE_LIB} + ${EXPAT_LIB}) endif() endif() if(WITH_MEM_JEMALLOC) |