Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/stinkfist/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
juj committed Mar 5, 2013
2 parents 8f89635 + 2ca7ed0 commit e7bc4eb
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2010 Jukka Jylänki
# Copyright 2010 Jukka Jyl�nki

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,18 +35,22 @@ macro(AddCompilationDefine define)
file(APPEND ${BUILD_CONFIG_FILE} "#ifndef ${define}\n#define ${define}\n#endif\n\n")
endmacro()

set(USE_BOOST TRUE)
option(BUILD_SAMPLES "Specifies whether kNet sample applications are built." FALSE)

option(BUILD_TESTS "Specifies whether kNet test applications are built." FALSE)

option(USE_BOOST "Specifies whether Boost is used." TRUE)
#set(BOOST_ROOT "TODO_SpecifyYourBoostRootHereIfCMakeAutoSearchFails")

# TinyXML is embedded to the repository, so you can safely keep this true.
# However, it is not required for core kNet use, but only for the MessageCompiler tool, in which
# case you can disable it here by setting USE_TINYXML to FALSE, and excluding MessageCompiler from the build.
set(USE_TINYXML TRUE)
option(USE_TINYXML "Specifies whether TinyXML, of which the MessageCompiler tool depends on, is included in the build." TRUE)
set(TINYXML_ROOT "src/tinyxml")

# If you want to enable the use of visual debugging/profiling windows, uncomment the following line (must
# have Qt installed and set up)
#set(USE_QT TRUE)
option(USE_QT "Specifies whether Qt is used to enable visual debugging/profiling windows." FALSE)

# To enable specific flags only in debug mode, use the following syntax.
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DKNET_LOGGING_SUPPORT_ENABLED")
Expand Down Expand Up @@ -199,20 +203,26 @@ target_link_libraries(kNet ${kNetLinkLibraries})

set(KNET_OUT_DIR ${CMAKE_SOURCE_DIR}/lib)

#add_subdirectory(samples/ConnectFlood)
#add_subdirectory(samples/FileTransfer)
#add_subdirectory(samples/FirewallTest)
#add_subdirectory(samples/HelloClient)
#add_subdirectory(samples/HelloServer)
#add_subdirectory(samples/LatencyTest)
#add_subdirectory(samples/MessageCompiler)
#add_subdirectory(samples/SilenceTest)
#add_subdirectory(samples/SimpleChat)
#add_subdirectory(samples/SpeedTest)
#add_subdirectory(samples/TrashTalk)
if (BUILD_SAMPLES)
add_subdirectory(samples/ConnectFlood)
if (USE_QT)
add_subdirectory(samples/FileTransfer)
endif()
add_subdirectory(samples/FirewallTest)
add_subdirectory(samples/HelloClient)
add_subdirectory(samples/HelloServer)
add_subdirectory(samples/LatencyTest)
add_subdirectory(samples/MessageCompiler)
add_subdirectory(samples/SilenceTest)
add_subdirectory(samples/SimpleChat)
add_subdirectory(samples/SpeedTest)
add_subdirectory(samples/TrashTalk)
endif()

#add_subdirectory(tests)
if (BUILD_TESTS)
add_subdirectory(tests)
endif()

set_target_properties(kNet PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)

0 comments on commit e7bc4eb

Please sign in to comment.