mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-21 21:20:04 +00:00
Allow opening CMakeLists as a CMake project in VS
Added another check just in case someone wants to do this for some reason. It's bad. You shouldn't do it.
This commit is contained in:
parent
1425074ccb
commit
da11220762
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
.vscode
|
.vscode/
|
||||||
bin/*
|
bin/*
|
||||||
notes.txt
|
notes.txt
|
||||||
config.ini
|
config.ini
|
||||||
@ -7,4 +7,5 @@ tags
|
|||||||
*~
|
*~
|
||||||
CMakeFiles/
|
CMakeFiles/
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
build/
|
build/
|
||||||
|
.vs/
|
@ -33,7 +33,9 @@ add_executable(openfusion ${SOURCES})
|
|||||||
set_target_properties(openfusion PROPERTIES OUTPUT_NAME ${BIN_NAME})
|
set_target_properties(openfusion PROPERTIES OUTPUT_NAME ${BIN_NAME})
|
||||||
|
|
||||||
# Use pthreads if not generating a VS solution or MinGW makefile (because MinGW will prefer Win32 threads)
|
# Use pthreads if not generating a VS solution or MinGW makefile (because MinGW will prefer Win32 threads)
|
||||||
if (NOT CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT CMAKE_GENERATOR MATCHES "MinGW Makefiles")
|
# Checking if the compiler ID is MSVC will allow us to open the project as a CMake project in VS.
|
||||||
|
# It's not something you should do, but it's there if you need it...
|
||||||
|
if (NOT CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_GENERATOR MATCHES "MinGW Makefiles")
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
target_link_libraries(openfusion pthread)
|
target_link_libraries(openfusion pthread)
|
||||||
endif()
|
endif()
|
Loading…
Reference in New Issue
Block a user