-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixed static RakNet build for vs2017 using cmake #124
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ ENDIF(WIN32 AND NOT UNIX) | |
|
||
|
||
# Options | ||
option( RAKNET_ENABLE_SAMPLES "Generate RakNet sample projects if true." TRUE ) | ||
option( RAKNET_ENABLE_SAMPLES "Generate RakNet sample projects if true." FALSE ) | ||
option( RAKNET_ENABLE_DLL "Generate the DLL project if true." TRUE ) | ||
option( RAKNET_ENABLE_STATIC "Generate the static library project if true." TRUE ) | ||
option( RAKNET_GENERATE_INCLUDE_ONLY_DIR "Setup a include/RakNet/ directory in which all the headers are copied." FALSE ) | ||
|
@@ -53,6 +53,6 @@ add_subdirectory(Lib) | |
|
||
set(RAKNET_COMMON_LIBS RakNetLibStatic) | ||
|
||
if( RAKNET_GENERATE_SAMPLES ) | ||
if( RAKNET_ENABLE_SAMPLES ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a duplicate of #51 . |
||
add_subdirectory(Samples) | ||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ IF(WIN32 AND NOT UNIX) | |
IF( MSVC10 OR MSVC11 OR MSVC12 ) | ||
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" ) | ||
ELSE() | ||
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:"LIBCD.lib LIBCMTD.lib MSVCRT.lib"" ) | ||
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks kind of flawed. Please note that the section you modified was used to generate VS2005/2008 project files for which, as far as my understanding goes, the "-usage was required. The proper "fix" to ensure that VS2015/VS2017 generated project files use the correct settings would be to either add MSVC14 to the list in ln 20 (see #64 for example) and/or drop the entire if/else clause here and solely go with the "-style (i.e. drop support for VS 2005/2008 which we did in SLikeNet now - the change will be available shortly in the SLikeNet Git and SVN repositories - https://github.com/SLikeSoft/SLikeNet ). |
||
ENDIF() | ||
|
||
ENDIF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that changing the default and disable the generation of the sample projects would be good. Hence not going to incorporate this in SLikeNet. Feel free to let me know your rational behind the change so we can reconsider our decision.