diff --git a/.gitmodules b/.gitmodules index 9748062bd2..3321a95461 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "ext/spice"] path = ext/spice url = https://github.com/OpenSpace/Spice.git +[submodule "ext/sgct"] + path = ext/sgct + url = https://github.com/opensgct/sgct.git diff --git a/ext/sgct b/ext/sgct new file mode 160000 index 0000000000..b8f1416d73 --- /dev/null +++ b/ext/sgct @@ -0,0 +1 @@ +Subproject commit b8f1416d73eae9542f9888b7f206c2249ac3256c diff --git a/include/openspace/network/parallelconnection.h b/include/openspace/network/parallelconnection.h index 979b57a8cc..d47c157eb3 100644 --- a/include/openspace/network/parallelconnection.h +++ b/include/openspace/network/parallelconnection.h @@ -43,7 +43,7 @@ #include #include -#ifdef __WIN32__ +#ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif @@ -52,7 +52,7 @@ #include #endif -#if defined(__WIN32__) || defined(__MING32__) || defined(__MING64__) +#if defined(WIN32) || defined(__MING32__) || defined(__MING64__) typedef size_t _SOCKET; #else typedef int _SOCKET; diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 416968cff7..260d8d64fe 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifdef __WIN32__ +#ifdef WIN32 #ifndef _ERRNO #define _ERRNO WSAGetLastError() #endif @@ -148,7 +148,7 @@ void ParallelConnection::closeSocket(){ * SHUT_RDWR (Disables further send and receive operations) */ -#ifdef __WIN32__ +#ifdef WIN32 shutdown(_clientSocket, SD_BOTH); closesocket(_clientSocket); #else diff --git a/support/cmake/support_macros.cmake b/support/cmake/support_macros.cmake index eea59d1cbf..0f7c0eb8d4 100644 --- a/support/cmake/support_macros.cmake +++ b/support/cmake/support_macros.cmake @@ -116,9 +116,31 @@ function (add_external_dependencies) set_property(TARGET lz4 PROPERTY FOLDER "External") # SGCT - find_package(SGCT REQUIRED) - target_include_directories(libOpenSpace SYSTEM PUBLIC ${SGCT_INCLUDE_DIRECTORIES}) - target_link_libraries(libOpenSpace ${SGCT_LIBRARIES}) + set(SGCT_TEXT OFF CACHE FORCE "") + set(SGCT_BUILD_CSHARP_PROJECTS OFF CACHE FORCE "") + + add_subdirectory(${OPENSPACE_EXT_DIR}/sgct) + target_include_directories(libOpenSpace SYSTEM PUBLIC ${OPENSPACE_EXT_DIR}/sgct/include) + target_link_libraries( + libOpenSpace + # sgct + sgct_light glew glfw png16_static quat tinythreadpp tinyxml2static turbojpeg-static + vrpn zlibstatic + # simd + ) + + set_property(TARGET sgct_light PROPERTY FOLDER "External") + set_property(TARGET glew PROPERTY FOLDER "External/SGCT") + set_property(TARGET glfw PROPERTY FOLDER "External/SGCT") + set_property(TARGET png16_static PROPERTY FOLDER "External/SGCT") + set_property(TARGET quat PROPERTY FOLDER "External/SGCT") + set_property(TARGET simd PROPERTY FOLDER "External/SGCT") + set_property(TARGET tinythreadpp PROPERTY FOLDER "External/SGCT") + set_property(TARGET tinyxml2static PROPERTY FOLDER "External/SGCT") + set_property(TARGET turbojpeg-static PROPERTY FOLDER "External/SGCT") + set_property(TARGET vrpn PROPERTY FOLDER "External/SGCT") + set_property(TARGET zlibstatic PROPERTY FOLDER "External/SGCT") + if (UNIX AND (NOT APPLE)) target_link_libraries(libOpenSpace Xcursor Xinerama X11) endif ()