优化CMakeLists.txt文件

This commit is contained in:
HEYAHONG 2024-08-21 12:11:24 +08:00
parent 4ae95a9f60
commit 2d88efe1c9
No known key found for this signature in database
GPG Key ID: 97E3E469FE2C920B
4 changed files with 6 additions and 6 deletions

View File

@ -3,11 +3,11 @@ if(POLICY CMP0079 )
cmake_policy(SET CMP0079 NEW)
endif()
add_subdirectory(hbox EXCLUDE_FROM_ALL)
add_subdirectory(hbox)
add_subdirectory(hcppbox EXCLUDE_FROM_ALL)
add_subdirectory(hcppbox)
add_subdirectory(hrc EXCLUDE_FROM_ALL)
add_subdirectory(hrc)
set_target_properties(HCppBox
PROPERTIES HCPPBOX_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}

View File

@ -5,7 +5,7 @@ if(MSVC)
add_compile_options(-utf-8 )
endif()
add_library(HBox)
add_library(HBox EXCLUDE_FROM_ALL)
file(GLOB HBOX_C_CPP_FILES *.cpp *.hpp *.c *.h cpp/*.cpp cpp/*.hpp cpp/*.c cpp/*.h)
target_sources(HBox PUBLIC ${HBOX_C_CPP_FILES})
target_include_directories(HBox PUBLIC ./ )

View File

@ -5,7 +5,7 @@ if(MSVC)
add_compile_options(-utf-8 )
endif()
add_library(HCppBox)
add_library(HCppBox EXCLUDE_FROM_ALL)
file(GLOB HCPPBOX_C_CPP_FILES *.cpp *.h)
target_sources(HCppBox PUBLIC ${HCPPBOX_C_CPP_FILES})
target_include_directories(HCppBox PUBLIC ./ )

View File

@ -25,7 +25,7 @@ add_custom_command(
DEPENDS ${FS_FILES}
)
add_library(RC STATIC RC.h RC.c ${CMAKE_CURRENT_SOURCE_DIR}/RC_fs.c)
add_library(RC STATIC EXCLUDE_FROM_ALL RC.h RC.c ${CMAKE_CURRENT_SOURCE_DIR}/RC_fs.c)
target_include_directories(RC PUBLIC .)
#