-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename library to mtgo_utils
- Loading branch information
Showing
10 changed files
with
33 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
compile_commands.json | ||
cscope.out | ||
**/build/* | ||
**/install/* | ||
|
||
# VSCode | ||
.vscode/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
add_subdirectory(gamelog) | ||
add_subdirectory(mtgo_utils) |
46 changes: 23 additions & 23 deletions
46
lib/gamelog/CMakeLists.txt → lib/mtgo_utils/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,77 @@ | ||
# Gamelog Library | ||
set(LOG_LIB gamelog) | ||
# mtgo_utils Library | ||
set(LIB_NAME mtgo_utils) | ||
|
||
set(LOG_SOURCES | ||
set(LIB_SOURCES | ||
src/gamelog.cpp | ||
) | ||
|
||
set(LOG_HEADERS | ||
include/gamelog/gamelog.h | ||
set(LIB_HEADERS | ||
include/mtgo_utils/gamelog.h | ||
) | ||
|
||
set(LOG_TESTS | ||
set(LIB_TESTS | ||
tests/test_main.cpp | ||
tests/test_gamelog.cpp | ||
) | ||
|
||
add_library( | ||
${LOG_LIB} | ||
${LIB_NAME} | ||
SHARED | ||
${LOG_SOURCES} | ||
${LIB_SOURCES} | ||
) | ||
|
||
set_target_properties( | ||
${LOG_LIB} | ||
${LIB_NAME} | ||
PROPERTIES | ||
VERSION ${PROJECT_VERSION} | ||
SOVERSION ${PROJECT_VERSION} | ||
PUBLIC_HEADER ${LOG_HEADERS} | ||
PUBLIC_HEADER ${LIB_HEADERS} | ||
) | ||
|
||
target_link_libraries( | ||
${LOG_LIB} | ||
${LIB_NAME} | ||
PRIVATE project_options | ||
project_warnings | ||
) | ||
|
||
analyse_with_iwyu(${LOG_LIB}) | ||
analyse_with_iwyu(${LIB_NAME}) | ||
|
||
target_include_directories( | ||
${LOG_LIB} | ||
${LIB_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
# System install | ||
install(TARGETS ${LOG_LIB} | ||
install(TARGETS ${LIB_NAME} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${LOG_LIB} | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${LIB_NAME} | ||
) | ||
|
||
# Unit Tests | ||
if (ENABLE_TESTING) | ||
add_executable( | ||
${LOG_LIB}-test | ||
${LOG_TESTS} | ||
${LIB_NAME}-test | ||
${LIB_TESTS} | ||
) | ||
target_link_libraries( | ||
${LOG_LIB}-test | ||
${LIB_NAME}-test | ||
PRIVATE | ||
${LOG_LIB} | ||
${LIB_NAME} | ||
gtest | ||
gtest_main | ||
project_options | ||
project_warnings | ||
) | ||
|
||
add_test( | ||
NAME ${LOG_LIB}-test | ||
COMMAND ${LOG_LIB}-test | ||
NAME ${LIB_NAME}-test | ||
COMMAND ${LIB_NAME}-test | ||
) | ||
|
||
install( | ||
TARGETS ${LOG_LIB}-test | ||
TARGETS ${LIB_NAME}-test | ||
RUNTIME DESTINATION build | ||
) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/gamelog/tests/test_gamelog.cpp → lib/mtgo_utils/tests/test_gamelog.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters