diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c3f4f439f..dbd6b5922 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -435,9 +435,12 @@ set(common_SRCS ${JTHREAD_SRCS} ${common_SCRIPT_SRCS} ${UTIL_SRCS} - ${UNITTEST_SRCS} ) +if(BUILD_UNITTESTS) + set(common_SRCS ${common_SRCS} ${UNITTEST_SRCS}) +endif() + # This gives us the icon and file version information if(WIN32) @@ -472,8 +475,12 @@ set(client_SRCS ${client_network_SRCS} ${client_irrlicht_changes_SRCS} ${client_SCRIPT_SRCS} - ${UNITTEST_CLIENT_SRCS} ) + +if(BUILD_UNITTESTS) + set(client_SRCS ${client_SRCS} ${UNITTEST_CLIENT_SRCS}) +endif() + list(SORT client_SRCS) # Server sources |