Skip to content

Commit

Permalink
Fix problem with solution folders being generated for MSVC Express
Browse files Browse the repository at this point in the history
Uses MFC header availability to detect Express versions.
  • Loading branch information
peterix committed Mar 13, 2012
1 parent 6dde237 commit badece1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ else(CMAKE_CONFIGURATION_TYPES)
endif(CMAKE_CONFIGURATION_TYPES)

# set up folder structures for IDE solutions
if(NOT CMAKE_USING_VC_FREE_TOOLS)
# MSVC Express won't load solutions that use this. It also doesn't include MFC supported
# Check for MFC!
find_package(MFC QUIET)
if(MFC_FOUND OR (NOT MSVC))
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
else()
OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF)
endif()
MARK_AS_ADVANCED(CMAKE_USE_FOLDERS)

# macro for setting up IDE folders without nasty IF()s everywhere
MACRO(IDE_FOLDER target folder)
Expand Down
1 change: 1 addition & 0 deletions depends/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ add_subdirectory(tthread)
OPTION(CLSOCKET_SHARED "Build clsocket lib as shared." OFF)
OPTION(CLSOCKET_DEP_ONLY "Build for use inside other CMake projects as dependency." ON)
add_subdirectory(clsocket)
IDE_FOLDER(clsocket "Depends")

0 comments on commit badece1

Please sign in to comment.