CMake: Replace link_directories with target_link_directories
This commit is contained in:
@@ -52,7 +52,6 @@ if(FREECAD_USE_PCH)
|
||||
ADD_MSVC_PRECOMPILED_HEADER(Surface PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
add_library(Surface SHARED ${Surface_SRCS})
|
||||
target_include_directories(
|
||||
Surface
|
||||
@@ -71,6 +70,7 @@ target_include_directories(
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_directories(Surface PUBLIC ${OCC_LIBRARY_DIR})
|
||||
target_link_libraries(Surface ${Surface_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Surface)
|
||||
|
||||
@@ -58,7 +58,6 @@ if(FREECAD_USE_PCH)
|
||||
ADD_MSVC_PRECOMPILED_HEADER(SurfaceGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
add_library(SurfaceGui SHARED
|
||||
${SurfaceGui_SRCS}
|
||||
${SurfaceGuiIcon_SVG}
|
||||
@@ -74,6 +73,7 @@ target_include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_directories(SurfaceGui PUBLIC ${OCC_LIBRARY_DIR})
|
||||
target_link_libraries(SurfaceGui ${SurfaceGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(SurfaceGui)
|
||||
|
||||
Reference in New Issue
Block a user