-
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.
Improve CMake & vcxproj files & fix build
- Loading branch information
Showing
8 changed files
with
40 additions
and
19 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
out/ | ||
.vs/ | ||
packages/ | ||
*.user | ||
*.user | ||
CMake*.json |
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,5 +1,14 @@ | ||
file(GLOB SourceFiles "*.cpp") | ||
|
||
add_executable("pystykorva" ${SourceFiles}) | ||
target_precompile_headers("pystykorva" PRIVATE "PCH.hpp") | ||
target_link_libraries("pystykorva" LINK_PRIVATE libpystykorva ICU::uc) | ||
if(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
set(ExecutableName "Pystykorva") | ||
set(LibraryName "LibPystykorva") | ||
else() | ||
set(ExecutableName "pystykorva") | ||
set(LibraryName "libpystykorva") | ||
endif() | ||
|
||
add_executable(${ExecutableName} ${SourceFiles}) | ||
target_precompile_headers(${ExecutableName} PRIVATE "PCH.hpp") | ||
target_link_libraries(${ExecutableName} LINK_PRIVATE ${LibraryName} ICU::uc) | ||
|
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,7 +1,12 @@ | ||
file(GLOB SourceFiles "*.cpp") | ||
|
||
add_library("libpystykorva" STATIC ${SourceFiles}) | ||
if(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
set(LibraryName "LibPystykorva") | ||
else() | ||
set(LibraryName "libpystykorva") | ||
endif() | ||
|
||
target_precompile_headers("libpystykorva" PRIVATE "PCH.hpp") | ||
add_library(${LibraryName} STATIC ${SourceFiles}) | ||
target_precompile_headers(${LibraryName} PRIVATE "PCH.hpp") | ||
target_link_libraries(${LibraryName} LINK_PUBLIC ICU::i18n ICU::uc) | ||
|
||
target_link_libraries("libpystykorva" LINK_PUBLIC ICU::i18n ICU::uc) |
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,8 +1,14 @@ | ||
file(GLOB SourceFiles "*.cpp") | ||
if(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
file(GLOB SourceFiles "*.cpp" "Win32/*.cpp") | ||
set(ExecutableName "PystykorvaTests") | ||
set(LibraryName "LibPystykorva") | ||
else() | ||
file(GLOB SourceFiles "*.cpp") | ||
set(ExecutableName "pystykorva_tests") | ||
set(LibraryName "libpystykorva") | ||
endif() | ||
|
||
add_executable("pystykorva_tests" ${SourceFiles}) | ||
|
||
add_test(NAME "pystykorva_tests" COMMAND $<TARGET_FILE:PystykorvaTests>) | ||
|
||
# target_precompile_headers("pystykorva_tests" PRIVATE "PCH.hpp") | ||
target_link_libraries("pystykorva_tests" LINK_PRIVATE libpystykorva gtest) | ||
add_executable(${ExecutableName} ${SourceFiles}) | ||
add_test(NAME ${ExecutableName} COMMAND $<TARGET_FILE:${ExecutableName}>) | ||
target_precompile_headers(${ExecutableName} PRIVATE "PCH.hpp") | ||
target_link_libraries(${ExecutableName} LINK_PRIVATE ${LibraryName} gtest) |
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