|
@@ -3,34 +3,53 @@ include_directories (${CMAKE_SOURCE_DIR}/Source/ThirdParty/rapidjson/include
|
|
|
${CMAKE_SOURCE_DIR}/Source/ThirdParty/nativefiledialog)
|
|
${CMAKE_SOURCE_DIR}/Source/ThirdParty/nativefiledialog)
|
|
|
|
|
|
|
|
|
|
|
|
|
-file (GLOB_RECURSE SOURCE_FILES Source/*.cpp Source/*.h)
|
|
|
|
|
|
|
+file (GLOB_RECURSE SOURCE_FILES *.cpp *.h)
|
|
|
|
|
+
|
|
|
|
|
+# Create the JSBind files ahead of time, so they are picked up with glob
|
|
|
|
|
+set (JSFILES JSPackageEditor.cpp;JSModuleEditor.cpp)
|
|
|
|
|
+
|
|
|
|
|
+foreach(JSFILE ${JSFILES})
|
|
|
|
|
+
|
|
|
|
|
+ set (JSFILEPATH "${CMAKE_SOURCE_DIR}/Build/Source/Generated/${JAVASCRIPT_BINDINGS_PLATFORM}/Javascript/Packages/Editor/${JSFILE}")
|
|
|
|
|
+
|
|
|
|
|
+ if (NOT EXISTS ${JSFILEPATH})
|
|
|
|
|
+ file(WRITE "${JSFILEPATH}" "// will be created by JSBind")
|
|
|
|
|
+ endif()
|
|
|
|
|
+
|
|
|
|
|
+endforeach()
|
|
|
|
|
+
|
|
|
|
|
+file (GLOB JAVASCRIPT_BINDINGS_SOURCE ${CMAKE_SOURCE_DIR}/Build/Source/Generated/${JAVASCRIPT_BINDINGS_PLATFORM}/Javascript/Packages/Editor/*.cpp)
|
|
|
|
|
+
|
|
|
|
|
+set (SOURCE_FILES ${SOURCE_FILES} ${JAVASCRIPT_BINDINGS_SOURCE})
|
|
|
|
|
|
|
|
if (APPLE)
|
|
if (APPLE)
|
|
|
|
|
+
|
|
|
|
|
+ file (GLOB_RECURSE OBJC_FILES *.mm *.h)
|
|
|
|
|
+ set (SOURCE_FILES ${SOURCE_FILES} ${OBJC_FILES})
|
|
|
|
|
+
|
|
|
set (EXE_TYPE MACOSX_BUNDLE)
|
|
set (EXE_TYPE MACOSX_BUNDLE)
|
|
|
- set (SOURCE_FILES ${SOURCE_FILES} Source/Build/BuildIOSUtils.mm)
|
|
|
|
|
|
|
|
|
|
#ICNS
|
|
#ICNS
|
|
|
set(MACOSX_BUNDLE_ICON_FILE Atomic.icns)
|
|
set(MACOSX_BUNDLE_ICON_FILE Atomic.icns)
|
|
|
set(ATOMIC_EDITOR_ICON ${CMAKE_SOURCE_DIR}/CMake/Modules/Atomic.icns)
|
|
set(ATOMIC_EDITOR_ICON ${CMAKE_SOURCE_DIR}/CMake/Modules/Atomic.icns)
|
|
|
set_source_files_properties(${ATOMIC_EDITOR_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
|
set_source_files_properties(${ATOMIC_EDITOR_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
|
|
|
|
+
|
|
|
elseif(LINUX)
|
|
elseif(LINUX)
|
|
|
|
|
|
|
|
else()
|
|
else()
|
|
|
include_directories (${CMAKE_SOURCE_DIR}/Source/ThirdParty/libcurl/include)
|
|
include_directories (${CMAKE_SOURCE_DIR}/Source/ThirdParty/libcurl/include)
|
|
|
add_definitions(-DCURL_STATICLIB)
|
|
add_definitions(-DCURL_STATICLIB)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
# We want the console for now
|
|
# We want the console for now
|
|
|
#set (EXE_TYPE WIN32)
|
|
#set (EXE_TYPE WIN32)
|
|
|
add_definitions(-DATOMIC_WIN32_CONSOLE)
|
|
add_definitions(-DATOMIC_WIN32_CONSOLE)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
set (SOURCE_FILES ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/CMake/Modules/Atomic.rc)
|
|
set (SOURCE_FILES ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/CMake/Modules/Atomic.rc)
|
|
|
endif(APPLE)
|
|
endif(APPLE)
|
|
|
|
|
|
|
|
-GroupSources("Source")
|
|
|
|
|
-
|
|
|
|
|
add_executable(AtomicEditor ${EXE_TYPE} ${SOURCE_FILES} ${ATOMIC_EDITOR_ICON})
|
|
add_executable(AtomicEditor ${EXE_TYPE} ${SOURCE_FILES} ${ATOMIC_EDITOR_ICON})
|
|
|
|
|
|
|
|
-target_link_libraries(AtomicEditor ToolCore AtomicJS Poco nativefiledialog ${ATOMIC_LINK_LIBRARIES})
|
|
|
|
|
|
|
+target_link_libraries(AtomicEditor ToolCore AtomicJS AtomicPlayerJS ToolCoreJS Poco nativefiledialog ${ATOMIC_LINK_LIBRARIES})
|
|
|
|
|
|
|
|
if (APPLE)
|
|
if (APPLE)
|
|
|
set (TARGET_PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.template)
|
|
set (TARGET_PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.template)
|
|
@@ -39,7 +58,7 @@ elseif(LINUX)
|
|
|
target_link_libraries(AtomicEditor curl nativefiledialog ${GTK3_LIBRARIES})
|
|
target_link_libraries(AtomicEditor curl nativefiledialog ${GTK3_LIBRARIES})
|
|
|
else()
|
|
else()
|
|
|
target_link_libraries(AtomicEditor libcurl Iphlpapi Wldap32)
|
|
target_link_libraries(AtomicEditor libcurl Iphlpapi Wldap32)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
# pre-Windows 8 can't count on D3DCompiler_47.dll being on system
|
|
# pre-Windows 8 can't count on D3DCompiler_47.dll being on system
|
|
|
add_custom_command (TARGET AtomicEditor POST_BUILD
|
|
add_custom_command (TARGET AtomicEditor POST_BUILD
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
COMMAND ${CMAKE_COMMAND}
|
|
@@ -50,3 +69,5 @@ endif()
|
|
|
if (TARGET_PROPERTIES)
|
|
if (TARGET_PROPERTIES)
|
|
|
set_target_properties (AtomicEditor PROPERTIES ${TARGET_PROPERTIES})
|
|
set_target_properties (AtomicEditor PROPERTIES ${TARGET_PROPERTIES})
|
|
|
endif ()
|
|
endif ()
|
|
|
|
|
+
|
|
|
|
|
+add_dependencies(AtomicEditor AtomicTool)
|