Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions ctrlppcheck/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
project(Ctrlppcheck)
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 3.11.0)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")

include(GNUInstallDirs)
include(FetchContent)

FetchContent_Declare(
tinyxml2
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
GIT_TAG 11.0.0
)
FetchContent_MakeAvailable(tinyxml2)

include(cmake/versions.cmake REQUIRED)
include(cmake/options.cmake REQUIRED)
Expand All @@ -11,7 +21,6 @@ include(cmake/compilerDefinitions.cmake REQUIRED)

file(GLOB cfgs "cfg/*.cfg")

add_subdirectory(externals/tinyxml2)
add_subdirectory(externals/simplecpp)
add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application
Expand Down
10 changes: 6 additions & 4 deletions ctrlppcheck/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
include_directories(${PROJECT_SOURCE_DIR}/lib/)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml2/)
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)

file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
file(GLOB mainfile "main.cpp")
list(REMOVE_ITEM srcs ${mainfile})

add_library(cli_objs OBJECT ${hdrs} ${srcs})
add_executable(ctrlppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml2_objs> $<TARGET_OBJECTS:simplecpp_objs>) #$<TARGET_OBJECTS:tinyxml_objs>
add_library(cli_objs OBJECT ${hdrs} ${srcs})

target_link_libraries(cli_objs PRIVATE tinyxml2)
add_executable(ctrlppcheck ${hdrs} ${mainfile})
target_link_libraries(ctrlppcheck PRIVATE cli_objs lib_objs simplecpp_objs)

if (WIN32 AND NOT BORLAND)
target_link_libraries(ctrlppcheck Shlwapi.lib)
target_link_libraries(ctrlppcheck PRIVATE Shlwapi.lib)
endif()

install(TARGETS ctrlppcheck
Expand Down
24 changes: 0 additions & 24 deletions ctrlppcheck/externals/tinyxml2/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions ctrlppcheck/externals/tinyxml2/LICENSE.txt

This file was deleted.

Loading
Loading