Merge pull request #23746 from 3x380V/cmake
CMake: Use scoped include and library directories
This commit is contained in:
@@ -2,11 +2,6 @@ if(WIN32)
|
||||
add_definitions(-DFCAppSpreadsheet)
|
||||
endif(WIN32)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(Spreadsheet_LIBS
|
||||
FreeCADApp
|
||||
)
|
||||
@@ -52,6 +47,14 @@ if(FREECAD_USE_PCH)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Spreadsheet SHARED ${Spreadsheet_SRCS})
|
||||
|
||||
target_include_directories(
|
||||
Spreadsheet
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(Spreadsheet ${Spreadsheet_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Spreadsheet)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
generate_from_py(ViewProviderSpreadsheet)
|
||||
|
||||
# The XML files
|
||||
@@ -105,7 +100,18 @@ set(SpreadsheetGui_UIC_SRCS
|
||||
DlgSettings.ui
|
||||
)
|
||||
|
||||
add_library(SpreadsheetGui SHARED ${SpreadsheetGui_SRCS} ${SpreadsheetGuiIcon_SVG})
|
||||
add_library(SpreadsheetGui SHARED
|
||||
${SpreadsheetGui_SRCS}
|
||||
${SpreadsheetGuiIcon_SVG}
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
SpreadsheetGui
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(SpreadsheetGui ${SpreadsheetGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(SpreadsheetGui)
|
||||
|
||||
Reference in New Issue
Block a user