Browse Source

Fix build errors

Rokas Kupstys 8 years ago
parent
commit
b87cc0bef5

+ 1 - 1
Source/Atomic/CMakeLists.txt

@@ -241,5 +241,5 @@ if (MSVC)
 endif ()
 
 if (UNIX OR MINGW)
-    target_compile_options(Atomic PUBLIC -std=gnu++11)
+    target_compile_options(Atomic PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
 endif ()

+ 6 - 1
Source/ThirdParty/SQLite/CMakeLists.txt

@@ -60,7 +60,12 @@ if (NOT IOS AND NOT TVOS AND NOT WEB)
 
     # Define dependency libs
     if (NOT WIN32)
-        set (LIBS dl pthread)    # ATOMIC FIX
+        # ATOMIC BEGIN
+        set (LIBS dl)
+        if (NOT ANDROID)
+            list (APPEND LIBS pthread)
+        endif ()
+        # ATOMIC END
         if (READLINE_FOUND)
             add_definitions (-DHAVE_READLINE)
             list (APPEND INCLUDE_DIRS ${READLINE_INCLUDE_DIRS})

+ 4 - 2
Source/ThirdParty/easy_profiler/CMakeLists.txt

@@ -8,7 +8,9 @@ set(EASY_PRODUCT_VERSION_STRING "${EASY_PROGRAM_VERSION_MAJOR}.${EASY_PROGRAM_VE
 
 # ATOMIC BEGIN
 
-find_package(Qt5Widgets)
+if (ATOMIC_DESKTOP)
+    find_package(Qt5Widgets)
+endif ()
 
 set(EASY_OPTION_LIB_STATIC ON CACHE BOOL "" FORCE)
 set(EASY_OPTION_PREDEFINED_COLORS ON CACHE BOOL "" FORCE)
@@ -43,7 +45,7 @@ add_subdirectory(easy_profiler_core)
 
 # ATOMIC BEGIN
 # Only include the Qt client if on we're building desktop platform and Qt5 was found on system
-if (ATOMIC_DESKTOP AND Qt5Widgets_FOUND)
+if (Qt5Widgets_FOUND)
     add_subdirectory(profiler_gui)
 endif()
 #ATOMIC END

+ 7 - 5
Source/ThirdParty/easy_profiler/easy_profiler_core/CMakeLists.txt

@@ -121,7 +121,11 @@ easy_define_target_option(easy_profiler EASY_OPTION_PREDEFINED_COLORS EASY_OPTIO
 
 if (UNIX)
     target_compile_options(easy_profiler PRIVATE -Wall -Wno-long-long -Wno-reorder -Wno-braced-scalar-init -pedantic -O3)
-    target_link_libraries(easy_profiler pthread)
+    # ATOMIC BEGIN
+    if (NOT ANDROID)
+        target_link_libraries(easy_profiler pthread)
+    endif ()
+    # ATOMIC END
 elseif (WIN32)
     target_compile_definitions(easy_profiler PRIVATE -D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
     target_link_libraries(easy_profiler ws2_32 psapi)
@@ -132,7 +136,7 @@ if (MINGW)
 endif ()
 
 if (APPLE)
-    target_compile_options(easy_profiler PUBLIC -std=gnu++11)
+    target_compile_options(easy_profiler PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
 else ()
     
 
@@ -141,11 +145,9 @@ else ()
             target_compile_options(easy_profiler PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
         endif ()
     else()
-    
         if (NOT MSVC)
-            target_compile_options(easy_profiler PUBLIC -std=gnu++11)
+            target_compile_options(easy_profiler PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
         endif ()
-        
         set_target_properties(easy_profiler PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
     endif ()
 endif ()