Changed: #880 Use PCH under Linux with CMake
This commit is contained in:
parent
f33365ea10
commit
6779fcf1b3
2 changed files with 4 additions and 16 deletions
|
@ -24,7 +24,7 @@ ENDIF(JPEG_FOUND)
|
|||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file)
|
||||
TARGET_LINK_LIBRARIES(nelmisc ${LIBXML2_LIBRARIES} ${PNG_LIBRARIES} ${WINSOCK2_LIB})
|
||||
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
||||
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
SOVERSION ${NL_VERSION_MAJOR}
|
||||
PROJECT_LABEL "Library: NeL Misc")
|
||||
|
@ -32,24 +32,12 @@ SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
|||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WIN32)
|
||||
FOREACH(FILENAME ${SRC})
|
||||
IF("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||
SET_SOURCE_FILES_PROPERTIES(stdmisc.cpp PROPERTIES COMPILE_FLAGS "/Ycstdmisc.h")
|
||||
ELSEIF("${FILENAME}" MATCHES "config_file")
|
||||
# I don't really want to do anything here but you can uncomment this if you need to test.
|
||||
# MESSAGE("Note: Not adding pre-compiled headers to: ${FILENAME}.")
|
||||
#
|
||||
ELSE("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||
SET_SOURCE_FILES_PROPERTIES(${FILENAME} PROPERTIES COMPILE_FLAGS "/Yustdmisc.h")
|
||||
ENDIF("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||
ENDFOREACH (FILENAME)
|
||||
|
||||
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r")
|
||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||
ELSE(WIN32)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
||||
|
||||
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -64,7 +64,7 @@ std::string CCmdArgs::getArg(char argName) const
|
|||
begin++;
|
||||
|
||||
// End
|
||||
uint size = _Args[i].size();
|
||||
uint size = (uint)_Args[i].size();
|
||||
if(size && _Args[i][size-1] == '"')
|
||||
size--;
|
||||
size = (uint)(std::max((int)0, (int)size-(int)begin));
|
||||
|
|
Loading…
Reference in a new issue