Merge pull request #10 from lioncash/cmake

CMakeLists: Minor cleanup
This commit is contained in:
Phillip Stephens 2019-08-30 02:13:13 -07:00 committed by GitHub
commit edc31b2107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 14 deletions

View File

@ -17,12 +17,8 @@ if (NOT TARGET logvisor)
add_subdirectory(logvisor) add_subdirectory(logvisor)
endif() endif()
file(GLOB NOD_HEADERS include/nod/*.h*)
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(driver) add_subdirectory(driver)
target_include_directories(nod PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
install(DIRECTORY include/nod DESTINATION include)
set(version_config_file "${PROJECT_BINARY_DIR}/nodConfigVersion.cmake") set(version_config_file "${PROJECT_BINARY_DIR}/nodConfigVersion.cmake")
set(config_file "${PROJECT_BINARY_DIR}/nodConfig.cmake") set(config_file "${PROJECT_BINARY_DIR}/nodConfig.cmake")

View File

@ -1,14 +1,31 @@
add_library(nod add_library(nod
aes.cpp aes.cpp
sha1.c sha1.c
DirectoryEnumerator.cpp
DiscBase.cpp DiscBase.cpp
DiscGCN.cpp DiscGCN.cpp
DiscIOISO.cpp DiscIOISO.cpp
DiscIOWBFS.cpp DiscIOWBFS.cpp
DiscWii.cpp DiscWii.cpp
DirectoryEnumerator.cpp
nod.cpp nod.cpp
${NOD_HEADERS})
../include/nod/aes.hpp
../include/nod/DirectoryEnumerator.hpp
../include/nod/DiscBase.hpp
../include/nod/DiscGCN.hpp
../include/nod/DiscWii.hpp
../include/nod/IDiscIO.hpp
../include/nod/IFileIO.hpp
../include/nod/nod.hpp
../include/nod/sha1.h
../include/nod/Util.hpp
)
target_include_directories(nod PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
)
target_link_libraries(nod PUBLIC logvisor) target_link_libraries(nod PUBLIC logvisor)
if(WIN32) if(WIN32)
@ -29,3 +46,5 @@ install(
ARCHIVE DESTINATION "lib" ARCHIVE DESTINATION "lib"
INCLUDES DESTINATION include # This sets the INTERFACE_INCLUDE_DIRECTORIES property of the target. INCLUDES DESTINATION include # This sets the INTERFACE_INCLUDE_DIRECTORIES property of the target.
) )
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include/nod DESTINATION include)